Skip to content

Update to TensorFlow 2.10.1 #282

New issue

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

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

Already on GitHub? Sign in to your account

Merged
merged 9 commits into from
Jan 24, 2023
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
4 changes: 2 additions & 2 deletions README.md
Original file line number Diff line number Diff line change
Expand Up @@ -72,7 +72,7 @@ working, the following commands will compile and run the tests.
```
git clone --recursive https://github.com/tensorflow/haskell.git tensorflow-haskell
cd tensorflow-haskell
docker build -t tensorflow/haskell:2.3.0 docker
docker build -t tensorflow/haskell:2.10.1 docker
# TODO: move the setup step to the docker script.
stack --docker setup
stack --docker test
Expand All @@ -90,7 +90,7 @@ stack --docker build --exec Main
If you want to use GPU you can do:

```
IMAGE_NAME=tensorflow/haskell:2.3.0-gpu
IMAGE_NAME=tensorflow/haskell:2.10.1-gpu
docker build -t $IMAGE_NAME docker/gpu
# TODO: move the setup step to the docker script.
stack --docker --docker-image=$IMAGE_NAME setup
Expand Down
6 changes: 3 additions & 3 deletions ci_build/Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# stack to be installed on the host. This comes at the expense of
# flexibility.

FROM tensorflow/tensorflow:2.3.0
FROM tensorflow/tensorflow:2.10.1
LABEL maintainer="TensorFlow authors <tensorflow-haskell@googlegroups.com>"

# The build context directory is the top of the tensorflow-haskell
Expand Down Expand Up @@ -36,8 +36,8 @@ RUN \
curl -O -L https://github.com/google/protobuf/releases/download/v3.13.0/protoc-3.13.0-linux-x86_64.zip && \
unzip -d /usr/local protoc-3.13.0-linux-x86_64.zip bin/protoc && \
chmod 755 /usr/local/bin/protoc && \
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.3.0.tar.gz && \
tar zxf libtensorflow-cpu-linux-x86_64-2.3.0.tar.gz -C /usr/local && \
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.10.1.tar.gz && \
tar zxf libtensorflow-cpu-linux-x86_64-2.10.1.tar.gz -C /usr/local && \
ldconfig && \
stack setup && \
stack test --only-dependencies
8 changes: 4 additions & 4 deletions docker/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prepare the image with:
# docker build -t tensorflow/haskell:2.3.0 docker
FROM tensorflow/tensorflow:2.3.0
# docker build -t tensorflow/haskell:2.10.1 docker
FROM tensorflow/tensorflow:2.10.1
LABEL maintainer="TensorFlow authors <tensorflow-haskell@googlegroups.com>"

RUN apt-get update
Expand Down Expand Up @@ -31,8 +31,8 @@ RUN \
curl -O -L https://github.com/google/protobuf/releases/download/v3.13.0/protoc-3.13.0-linux-x86_64.zip && \
unzip -d /usr/local protoc-3.13.0-linux-x86_64.zip bin/protoc && \
chmod 755 /usr/local/bin/protoc && \
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.3.0.tar.gz && \
tar zxf libtensorflow-cpu-linux-x86_64-2.3.0.tar.gz -C /usr/local && \
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-cpu-linux-x86_64-2.10.1.tar.gz && \
tar zxf libtensorflow-cpu-linux-x86_64-2.10.1.tar.gz -C /usr/local && \
ldconfig

ENV LANG en_US.UTF-8
8 changes: 4 additions & 4 deletions docker/gpu/Dockerfile
Original file line number Diff line number Diff line change
@@ -1,6 +1,6 @@
# Prepare the image with:
# docker build -t tensorflow/haskell:2.3.0-gpu docker/gpu
FROM tensorflow/tensorflow:2.3.0-gpu
# docker build -t tensorflow/haskell:2.10.1-gpu docker/gpu
FROM tensorflow/tensorflow:2.10.1-gpu
LABEL maintainer="TensorFlow authors <tensorflow-haskell@googlegroups.com>"

RUN apt-get update
Expand Down Expand Up @@ -31,8 +31,8 @@ RUN \
curl -O -L https://github.com/google/protobuf/releases/download/v3.13.0/protoc-3.13.0-linux-x86_64.zip && \
unzip -d /usr/local protoc-3.13.0-linux-x86_64.zip bin/protoc && \
chmod 755 /usr/local/bin/protoc && \
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.3.0.tar.gz && \
tar zxf libtensorflow-gpu-linux-x86_64-2.3.0.tar.gz -C /usr/local && \
curl -O https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-gpu-linux-x86_64-2.10.1.tar.gz && \
tar zxf libtensorflow-gpu-linux-x86_64-2.10.1.tar.gz -C /usr/local && \
ldconfig

ENV LANG en_US.UTF-8
12 changes: 7 additions & 5 deletions stack.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -14,8 +14,10 @@ packages:
- tensorflow-test

extra-deps:
- snappy-framing-0.1.2
- c2hs-0.28.8
- language-c-0.9.2
- snappy-0.2.0.2
- snappy-framing-0.1.2

# For Mac OS X, whose linker doesn't use this path by default
# unless you run `xcode-select --install`.
Expand All @@ -27,10 +29,10 @@ extra-include-dirs:

docker:
enable: false
image: tensorflow/haskell:2.3.0
image: tensorflow/haskell:2.10.1

nix:
enable: false
# nixos-21.05 with libtensorflow 2.3.0
path: ["nixpkgs=https://github.com/NixOS/nixpkgs/archive/c7cb72b0cae397d311236d6773338efb4bd4f2d1.tar.gz"]
packages: [snappy, zlib, protobuf, python3Packages.tensorflow_2.libtensorflow]
# nixos-22.11 with libtensorflow 2.10.1
path: ["nixpkgs=https://github.com/NixOS/nixpkgs/archive/2dea8991d89b9f1e78d874945f78ca15f6954289.tar.gz"]
packages: [snappy, zlib, protobuf, libtensorflow]
10 changes: 10 additions & 0 deletions tensorflow-core-ops/Setup.hs
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,16 @@ blackList =
, "_TPUReplicate"
, "_While"
, "_XlaCompile"
-- Incorrectly generated:
, "_FusedBatchNormGradEx"
-- Could not deduce:
, "_MklFusedBatchNorm"
, "_MklFusedBatchNormEx"
, "_MklFusedBatchNormGrad"
, "_MklFusedBatchNormGradV2"
, "_MklFusedBatchNormGradV3"
, "_MklFusedBatchNormV2"
, "_MklFusedBatchNormV3"
]

autogenModulesDir :: LocalBuildInfo -> FilePath
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-core-ops/tensorflow-core-ops.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Custom
cabal-version: >=2.0
cabal-version: 2.0

library
exposed-modules: TensorFlow.GenOps.Core
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-logging/tensorflow-logging.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Simple
cabal-version: >=1.22
cabal-version: 2.0

library
hs-source-dirs: src
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Custom
cabal-version: >=1.24
cabal-version: 2.0
-- These files are downloaded automatically by Setup.hs. If the
-- automatic download fails, follow the instructions in error messages
-- displayed by Setup.hs.
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-mnist/tensorflow-mnist.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Simple
cabal-version: >=1.22
cabal-version: 2.0
data-files: data/*.ckpt
, data/*.pb

Expand Down
2 changes: 1 addition & 1 deletion tensorflow-opgen/tensorflow-opgen.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Simple
cabal-version: >=1.22
cabal-version: 2.0

library
hs-source-dirs: src
Expand Down
2 changes: 1 addition & 1 deletion tensorflow-ops/tensorflow-ops.cabal
Original file line number Diff line number Diff line change
Expand Up @@ -10,7 +10,7 @@ maintainer: tensorflow-haskell@googlegroups.com
copyright: Google Inc.
category: Machine Learning
build-type: Simple
cabal-version: >=1.22
cabal-version: 2.0

library
hs-source-dirs: src
Expand Down
Loading