Skip to content
This repository was archived by the owner on Jul 1, 2023. It is now read-only.

build: bump TensorFlow to 2.3.0 #1051

Merged
merged 2 commits into from
Aug 7, 2020
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
2 changes: 1 addition & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -128,7 +128,7 @@ if(NOT X10_FOUND AND NOT USE_BUNDLED_X10)
GIT_REPOSITORY
git://github.com/tensorflow/tensorflow
GIT_TAG
r2.2
r2.3
UPDATE_DISCONNECTED
TRUE
CONFIGURE_COMMAND
Expand Down
6 changes: 4 additions & 2 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -2,6 +2,7 @@ FROM gcr.io/swift-tensorflow/base-deps-cuda10.2-cudnn7-ubuntu18.04

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

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

Expand Down
10 changes: 5 additions & 5 deletions Sources/x10/xla_client/tf_logging.h
Original file line number Diff line number Diff line change
Expand Up @@ -71,11 +71,11 @@ class ErrorGenerator {
TF_ERROR_STREAM() << "Check failed: " #condition " "

#define TF_CHECK_OP_LOG(name, op, val1, val2) \
while (::tensorflow::internal::CheckOpString _result = \
::tensorflow::internal::name##Impl( \
::tensorflow::internal::GetReferenceableValue(val1), \
::tensorflow::internal::GetReferenceableValue(val2), \
#val1 " " #op " " #val2)) \
while (::tensorflow::internal::CheckOpString _result{ \
::tensorflow::internal::name##Impl( \
::tensorflow::internal::GetReferenceableValue(val1), \
::tensorflow::internal::GetReferenceableValue(val2), \
#val1 " " #op " " #val2)}) \
TF_ERROR_STREAM() << *(_result.str_)

#define TF_CHECK_OP(name, op, val1, val2) TF_CHECK_OP_LOG(name, op, val1, val2)
Expand Down
7 changes: 4 additions & 3 deletions Tests/TensorFlowTests/OperatorTests/DatasetTests.swift
Original file line number Diff line number Diff line change
Expand Up @@ -111,10 +111,11 @@ final class DatasetTests: XCTestCase {
func testMapToDifferentType() {
let scalars = Tensor<Float>(rangeFrom: 0, to: 5, stride: 1)
let dataset = Dataset(elements: scalars)
let shuffled = dataset.shuffled(sampleCount: 5, randomSeed: 42)
XCTAssertEqual([0, 4, 1, 3, 2], shuffled.map { $0.scalar! })
let shuffled = dataset.shuffled(sampleCount: 5, randomSeed: 42,
reshuffleForEachIterator: false)
XCTAssertEqual([2, 1, 3, 4, 0], shuffled.map { $0.scalar! })
let evens = shuffled.map { Tensor($0 % 2) .== Tensor(0) }
XCTAssertEqual(evens.map { $0.scalar! }, [true, true, false, false, true])
XCTAssertEqual(evens.map { $0.scalar! }, [true, false, false, true, true])
}

func testSingleValueBatched() {
Expand Down