Skip to content

Commit 2659a4e

Browse files
committed
Upgrade to TensorFlow 2.16.1
1 parent 454da03 commit 2659a4e

File tree

7 files changed

+43
-39
lines changed

7 files changed

+43
-39
lines changed

.github/workflows/requirements.txt

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -1 +1 @@
1-
tensorflow == 2.13.0
1+
tensorflow == 2.16.1

RELEASING.md

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -63,5 +63,6 @@ Note that any crate not mentioned here (e.g. tensorflow-proto-codegen, tensorflo
6363
1. Run `source ~/tensorflow-${TENSORFLOW_VERSION?}/bin/activate` to activate the virtualenv
6464
1. Run `pip install --upgrade pip`
6565
1. Run `pip install --upgrade tensorflow==${TENSORFLOW_VERSION?}`
66+
1. Run `pip install tf_keras` (required for examples/mobilenetv3)
6667
1. Run `python examples/addition/addition.py`
6768
1. Run `deactivate` to exit the virtualenv

examples/addition/model.pb

0 Bytes
Binary file not shown.

run-valgrind

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,7 @@ function run {
1919
echo
2020
}
2121

22-
tensorflow_version=2.13.0
22+
tensorflow_version=2.16.1
2323

2424
valgrind_log=valgrind.log
2525
truncate --size=0 "$valgrind_log"

tensorflow-proto-codegen/src/main.rs

Lines changed: 31 additions & 31 deletions
Original file line numberDiff line numberDiff line change
@@ -18,39 +18,39 @@ fn main() -> Result<(), Box<dyn Error>> {
1818
)
1919
.inputs(
2020
[
21-
"core/framework/allocation_description.proto",
22-
"core/framework/attr_value.proto",
23-
"core/framework/cost_graph.proto",
24-
"core/framework/full_type.proto",
25-
"core/framework/function.proto",
26-
"core/framework/graph.proto",
27-
"core/framework/graph_debug_info.proto",
28-
"core/framework/node_def.proto",
29-
"core/framework/op_def.proto",
30-
"core/framework/resource_handle.proto",
31-
"core/framework/step_stats.proto",
32-
"core/framework/tensor.proto",
33-
"core/framework/tensor_description.proto",
34-
"core/framework/tensor_shape.proto",
35-
"core/framework/types.proto",
36-
"core/framework/variable.proto",
37-
"core/framework/versions.proto",
38-
"core/protobuf/cluster.proto",
39-
"core/protobuf/config.proto",
40-
"core/protobuf/debug.proto",
41-
"core/protobuf/meta_graph.proto",
42-
"core/protobuf/rewriter_config.proto",
43-
"core/protobuf/saved_model.proto",
44-
"core/protobuf/saved_object_graph.proto",
45-
"core/protobuf/saver.proto",
46-
"core/protobuf/struct.proto",
47-
"core/protobuf/trackable_object_graph.proto",
48-
"core/protobuf/verifier_config.proto",
49-
"tsl/protobuf/coordination_config.proto",
50-
"tsl/protobuf/rpc_options.proto",
21+
"tensorflow/core/framework/allocation_description.proto",
22+
"tensorflow/core/framework/attr_value.proto",
23+
"tensorflow/core/framework/cost_graph.proto",
24+
"tensorflow/core/framework/full_type.proto",
25+
"tensorflow/core/framework/function.proto",
26+
"tensorflow/core/framework/graph.proto",
27+
"tensorflow/core/framework/graph_debug_info.proto",
28+
"tensorflow/core/framework/node_def.proto",
29+
"tensorflow/core/framework/op_def.proto",
30+
"tensorflow/core/framework/resource_handle.proto",
31+
"tensorflow/core/framework/step_stats.proto",
32+
"tensorflow/core/framework/tensor.proto",
33+
"tensorflow/core/framework/tensor_description.proto",
34+
"tensorflow/core/framework/tensor_shape.proto",
35+
"tensorflow/core/framework/types.proto",
36+
"tensorflow/core/framework/variable.proto",
37+
"tensorflow/core/framework/versions.proto",
38+
"tensorflow/core/protobuf/cluster.proto",
39+
"tensorflow/core/protobuf/config.proto",
40+
"tensorflow/core/protobuf/debug.proto",
41+
"tensorflow/core/protobuf/meta_graph.proto",
42+
"tensorflow/core/protobuf/rewriter_config.proto",
43+
"tensorflow/core/protobuf/saved_model.proto",
44+
"tensorflow/core/protobuf/saved_object_graph.proto",
45+
"tensorflow/core/protobuf/saver.proto",
46+
"tensorflow/core/protobuf/struct.proto",
47+
"tensorflow/core/protobuf/trackable_object_graph.proto",
48+
"tensorflow/core/protobuf/verifier_config.proto",
49+
"third_party/xla/third_party/tsl/tsl/protobuf/coordination_config.proto",
50+
"third_party/xla/third_party/tsl/tsl/protobuf/rpc_options.proto",
5151
]
5252
.iter()
53-
.map(|p| format!("{}/tensorflow/{}", tensorflow_folder, p))
53+
.map(|p| format!("{}/{}", tensorflow_folder, p))
5454
.collect::<Vec<_>>(),
5555
)
5656
.include(tensorflow_folder)

tensorflow-sys/build.rs

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -24,8 +24,8 @@ const REPOSITORY: &str = "https://github.com/tensorflow/tensorflow.git";
2424
const FRAMEWORK_TARGET: &str = "tensorflow:libtensorflow_framework";
2525
const TARGET: &str = "tensorflow:libtensorflow";
2626
// `VERSION` and `TAG` are separate because the tag is not always `'v' + VERSION`.
27-
const VERSION: &str = "2.13.0";
28-
const TAG: &str = "v2.13.0";
27+
const VERSION: &str = "2.16.1";
28+
const TAG: &str = "v2.16.1";
2929
const MIN_BAZEL: &str = "3.7.2";
3030

3131
macro_rules! get(($name:expr) => (ok!(env::var($name))));
@@ -198,11 +198,11 @@ fn install_prebuilt() {
198198
let windows = target_os() == "windows";
199199
let ext = if windows { ".zip" } else { ".tar.gz" };
200200
let binary_url = format!(
201-
"https://storage.googleapis.com/tensorflow/libtensorflow/libtensorflow-{}-{}-{}-{}{}",
201+
"https://storage.googleapis.com/tensorflow/versions/{}/libtensorflow-{}-{}-{}{}",
202+
VERSION,
202203
proc_type,
203204
os,
204205
target_arch(),
205-
VERSION,
206206
ext
207207
);
208208
log_var!(binary_url);

test-all

Lines changed: 5 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -20,7 +20,7 @@ if [[ "${version_build_script}" != "${version_run_valgrind}" || \
2020
echo " valgrind run script."
2121
echo " tensorflow-sys/build.rs: ${version_build_script}"
2222
echo " run-valgrind: ${version_run_valgrind}"
23-
echo " ./github/workflows/requirements.txt: ${version_requirements}"
23+
echo " .github/workflows/requirements.txt: ${version_requirements}"
2424
exit 1
2525
fi
2626

@@ -47,7 +47,10 @@ if [[ "${version_tensorflow_sys_crate}" != "${version_tensorflow_sys_readme}" ]]
4747
exit 1
4848
fi
4949

50-
run python3 examples/mobilenetv3/create_model.py
50+
# Legacy Keras required for now because Keras 3 requires exporting models as
51+
# Keras format, which the C API can't read:
52+
# https://github.com/tensorflow/tensorflow/issues/70514
53+
TF_USE_LEGACY_KERAS=1 run python3 examples/mobilenetv3/create_model.py
5154
# TODO(#391): Re-enable: (cd test_resources/library && ./build-test-op)
5255
run cargo fmt --all -- --check
5356
run cargo test -vv -j 2

0 commit comments

Comments
 (0)