Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.

Commit 6edddf9

Browse files
committedAug 6, 2020
build: bump TensorFlow to 2.3.0
The TensorFlow 2.3.0 release is GA'ed. Update the version that we use. Adjust the XLA Client logging for API changes in the latest TensorFlow release. Avoid the re-shuffling of the tensor during the tests. Thanks to @texasmichelle for tracking down the issue with the test failure!
1 parent b5fe3a6 commit 6edddf9

File tree

4 files changed

+14
-11
lines changed

4 files changed

+14
-11
lines changed
 

‎CMakeLists.txt

+1-1
Original file line numberDiff line numberDiff line change
@@ -128,7 +128,7 @@ if(NOT X10_FOUND AND NOT USE_BUNDLED_X10)
128128
GIT_REPOSITORY
129129
git://github.com/tensorflow/tensorflow
130130
GIT_TAG
131-
r2.2
131+
r2.3
132132
UPDATE_DISCONNECTED
133133
TRUE
134134
CONFIGURE_COMMAND

‎Dockerfile

+4-2
Original file line numberDiff line numberDiff line change
@@ -2,6 +2,7 @@ FROM gcr.io/swift-tensorflow/base-deps-cuda10.2-cudnn7-ubuntu18.04
22

33
# Allows the caller to specify the toolchain to use.
44
ARG swift_tf_url=https://storage.googleapis.com/swift-tensorflow-artifacts/nightlies/latest/swift-tensorflow-DEVELOPMENT-notf-ubuntu18.04.tar.gz
5+
ARG bazel_version=3.1.0
56

67
RUN if test -d /swift-apis/google-cloud-sdk; then \
78
mv /swift-apis/google-cloud-sdk /opt/google-cloud-sdk; \
@@ -34,11 +35,12 @@ RUN echo 'deb [arch=amd64] https://storage.googleapis.com/bazel-apt stable jdk1.
3435
ARG DEBIAN_FRONTEND=noninteractive
3536
ARG DEBCONF_NONINTERACTIVE_SEEN=true
3637
RUN apt-get -yq update \
37-
&& apt-get -yq install --no-install-recommends bazel-2.0.0 cmake ninja-build \
38+
&& apt-get -yq install --no-install-recommends cmake ninja-build \
3839
&& apt-get -yq install --no-install-recommends python-dev python-pip \
40+
&& apt-get -yq install --no-install-recommends bazel-$bazel_version \
3941
&& apt-get clean \
4042
&& rm -rf /tmp/* /var/tmp/* /var/lib/apt/archive/* /var/lib/apt/lists/*
41-
RUN ln -s /usr/bin/bazel-2.0.0 /usr/bin/bazel
43+
RUN ln -s /usr/bin/bazel-$bazel_version /usr/bin/bazel
4244
RUN pip install -U pip six numpy wheel setuptools mock 'future>=0.17.1' \
4345
&& pip install -U --no-deps keras_applications keras_preprocessing
4446

‎Sources/x10/xla_client/tf_logging.h

+5-5
Original file line numberDiff line numberDiff line change
@@ -71,11 +71,11 @@ class ErrorGenerator {
7171
TF_ERROR_STREAM() << "Check failed: " #condition " "
7272

7373
#define TF_CHECK_OP_LOG(name, op, val1, val2) \
74-
while (::tensorflow::internal::CheckOpString _result = \
75-
::tensorflow::internal::name##Impl( \
76-
::tensorflow::internal::GetReferenceableValue(val1), \
77-
::tensorflow::internal::GetReferenceableValue(val2), \
78-
#val1 " " #op " " #val2)) \
74+
while (::tensorflow::internal::CheckOpString _result{ \
75+
::tensorflow::internal::name##Impl( \
76+
::tensorflow::internal::GetReferenceableValue(val1), \
77+
::tensorflow::internal::GetReferenceableValue(val2), \
78+
#val1 " " #op " " #val2)}) \
7979
TF_ERROR_STREAM() << *(_result.str_)
8080

8181
#define TF_CHECK_OP(name, op, val1, val2) TF_CHECK_OP_LOG(name, op, val1, val2)

‎Tests/TensorFlowTests/OperatorTests/DatasetTests.swift

+4-3
Original file line numberDiff line numberDiff line change
@@ -111,10 +111,11 @@ final class DatasetTests: XCTestCase {
111111
func testMapToDifferentType() {
112112
let scalars = Tensor<Float>(rangeFrom: 0, to: 5, stride: 1)
113113
let dataset = Dataset(elements: scalars)
114-
let shuffled = dataset.shuffled(sampleCount: 5, randomSeed: 42)
115-
XCTAssertEqual([0, 4, 1, 3, 2], shuffled.map { $0.scalar! })
114+
let shuffled = dataset.shuffled(sampleCount: 5, randomSeed: 42,
115+
reshuffleForEachIterator: false)
116+
XCTAssertEqual([2, 1, 3, 4, 2], shuffled.map { $0.scalar! })
116117
let evens = shuffled.map { Tensor($0 % 2) .== Tensor(0) }
117-
XCTAssertEqual(evens.map { $0.scalar! }, [true, true, false, false, true])
118+
XCTAssertEqual(evens.map { $0.scalar! }, [true, false, false, true, true])
118119
}
119120

120121
func testSingleValueBatched() {

0 commit comments

Comments
 (0)
This repository has been archived.