From ee6c8736cece8e6c935d1b9e4b1519a692ab9f58 Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 9 Feb 2023 19:36:05 +0000 Subject: [PATCH 1/7] Update compat protos test with a mapping from a new dir in TF to our compat protos dir. --- tensorboard/compat/proto/proto_test.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/tensorboard/compat/proto/proto_test.py b/tensorboard/compat/proto/proto_test.py index 0874e4a977..f76604c6bb 100644 --- a/tensorboard/compat/proto/proto_test.py +++ b/tensorboard/compat/proto/proto_test.py @@ -148,8 +148,9 @@ ("tensorflow/core/framework/", "tensorboard/compat/proto/"), ("tensorflow/core/protobuf/", "tensorboard/compat/proto/"), ("tensorflow/core/profiler/", "tensorboard/compat/proto/"), - ("tensorflow/python/framework/", "tensorboard/compat/proto/"), ("tensorflow/core/util/", "tensorboard/compat/proto/"), + ("tensorflow/python/framework/", "tensorboard/compat/proto/"), + ("tensorflow/tsl/protobuf/", "tensorboard/compat/proto/"), ('package: "tensorflow.tfprof"', 'package: "tensorboard"'), ('package: "tensorflow"', 'package: "tensorboard"'), ('type_name: ".tensorflow.tfprof', 'type_name: ".tensorboard'), From a128cf3863036c69739078cd4154498609cd738f Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 9 Feb 2023 19:49:31 +0000 Subject: [PATCH 2/7] Updates compat proto copies by running our script to sync with TF protos. --- tensorboard/compat/proto/BUILD | 1 - tensorboard/compat/proto/config.proto | 48 ++++++++++++++-------- tensorboard/compat/proto/full_type.proto | 11 +++++ tensorboard/compat/proto/tensor.proto | 4 ++ tensorboard/compat/proto/tfprof_log.proto | 3 +- tensorboard/compat/proto/types.proto | 7 +++- tensorboard/data/server/descriptor.bin | Bin 57875 -> 58428 bytes tensorboard/data/server/tensorboard.pb.rs | 14 ++++++- 8 files changed, 68 insertions(+), 20 deletions(-) diff --git a/tensorboard/compat/proto/BUILD b/tensorboard/compat/proto/BUILD index ef662dca66..788e9ad69f 100644 --- a/tensorboard/compat/proto/BUILD +++ b/tensorboard/compat/proto/BUILD @@ -238,7 +238,6 @@ tb_proto_library( tb_proto_library( name = "summary", srcs = ["summary.proto"], - exports = [":histogram"], deps = [ ":histogram", ":tensor", diff --git a/tensorboard/compat/proto/config.proto b/tensorboard/compat/proto/config.proto index 400e02f28c..6b97e1af73 100644 --- a/tensorboard/compat/proto/config.proto +++ b/tensorboard/compat/proto/config.proto @@ -18,9 +18,9 @@ option java_package = "org.tensorflow.framework"; option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/protobuf/for_core_protos_go_proto"; message GPUOptions { - // Fraction of the available GPU memory to allocate for each process. + // 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 available GPU memory. + // allocates up to ~50% of the total GPU memory. // // GPU memory is pre-allocated unless the allow_growth option is enabled. // @@ -239,6 +239,19 @@ message GPUOptions { // hopes that another thread will free up memory in the meantime. Setting // this to true disables the sleep; instead we'll OOM immediately. bool disallow_retry_on_allocation_failure = 12; + + // Memory limit for "GPU host allocator", aka pinned memory allocator. This + // can also be set via the envvar TF_GPU_HOST_MEM_LIMIT_IN_MB. + float gpu_host_mem_limit_in_mb = 13; + + // 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. + bool gpu_host_mem_disallow_growth = 14; } // Everything inside experimental is subject to change and is not subject @@ -582,7 +595,8 @@ message ConfigProto { // 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. + // NOTE: This is currently used and propagated only by the direct session + // and EagerContext. SessionMetadata session_metadata = 11; // If true, the session may treat the graph as being static for optimization @@ -615,18 +629,9 @@ message ConfigProto { MLIR_BRIDGE_ROLLOUT_ENABLED = 1; // Disabling the MLIR bridge disables it for all graphs in this session. MLIR_BRIDGE_ROLLOUT_DISABLED = 2; - // Enable the MLIR bridge on a per graph basis based on an analysis of - // the features used in the graph. If the features used by the graph are - // supported by the MLIR bridge, the MLIR bridge will be used to run the - // graph. - MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED = 3; - // Enable the MLIR bridge in a fallback mode on a per graph basis based - // on an analysis of the features used in the graph. - // Running the MLIR bridge in the fallback mode means that it is - // executed and it commits all the changes to the TF graph in case - // of success. And it does not in case of failures and let the old bridge - // to process the TF graph. - MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED = 4; + reserved 3, 4; + reserved "MLIR_BRIDGE_ROLLOUT_SAFE_MODE_ENABLED", + "MLIR_BRIDGE_ROLLOUT_SAFE_MODE_FALLBACK_ENABLED"; } // Whether to enable the MLIR-based TF->XLA bridge. MlirBridgeRollout mlir_bridge_rollout = 17; @@ -675,7 +680,18 @@ message ConfigProto { // Distributed coordination service configurations. CoordinationServiceConfig coordination_config = 23; - // Next: 24 + // 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. + bool disable_optimize_for_static_graph = 24; + + // Next: 25 } Experimental experimental = 16; diff --git a/tensorboard/compat/proto/full_type.proto b/tensorboard/compat/proto/full_type.proto index 1f595f045d..56856c6852 100644 --- a/tensorboard/compat/proto/full_type.proto +++ b/tensorboard/compat/proto/full_type.proto @@ -186,6 +186,17 @@ enum FullTypeId { // TFT_ENCODING[TFT_INT32, TFT_STRING] is an integer encoded as string. TFT_ENCODED = 1004; + // The type of "shape tensors" where the runtime value is the shape of + // some tensor(s), i.e. the output of tf.shape. + // 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 = 1005; + // Type attributes. These always appear in the parametrization of a type, // never alone. For example, there is no such thing as a "bool" TensorFlow // object (for now). diff --git a/tensorboard/compat/proto/tensor.proto b/tensorboard/compat/proto/tensor.proto index 64300b4dea..801bbef3b5 100644 --- a/tensorboard/compat/proto/tensor.proto +++ b/tensorboard/compat/proto/tensor.proto @@ -83,6 +83,10 @@ message TensorProto { // DT_UINT64 repeated uint64 uint64_val = 17 [packed = true]; + + // DT_FLOAT8_*, use variable-sized set of bytes + // (i.e. the equivalent of repeated uint8, if such a thing existed). + bytes float8_val = 18; } // Protocol buffer representing the serialization format of DT_VARIANT tensors. diff --git a/tensorboard/compat/proto/tfprof_log.proto b/tensorboard/compat/proto/tfprof_log.proto index 72d51d2da3..68a2b2fe8f 100644 --- a/tensorboard/compat/proto/tfprof_log.proto +++ b/tensorboard/compat/proto/tfprof_log.proto @@ -1,11 +1,12 @@ syntax = "proto3"; package tensorboard; -option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/profiler/tfprof_log_go_proto"; import "tensorboard/compat/proto/attr_value.proto"; import "tensorboard/compat/proto/step_stats.proto"; +option go_package = "github.com/tensorflow/tensorflow/tensorflow/go/core/profiler/protos_all_go_proto"; + // It specifies the Python callstack that creates an op. message CodeDef { repeated Trace traces = 1; diff --git a/tensorboard/compat/proto/types.proto b/tensorboard/compat/proto/types.proto index 4191bd60e3..ddc8751b32 100644 --- a/tensorboard/compat/proto/types.proto +++ b/tensorboard/compat/proto/types.proto @@ -30,7 +30,7 @@ enum DataType { DT_QINT8 = 11; // Quantized int8 DT_QUINT8 = 12; // Quantized uint8 DT_QINT32 = 13; // Quantized int32 - DT_BFLOAT16 = 14; // Float32 truncated to 16 bits. Only for cast ops. + DT_BFLOAT16 = 14; // Float32 truncated to 16 bits. DT_QINT16 = 15; // Quantized int16 DT_QUINT16 = 16; // Quantized uint16 DT_UINT16 = 17; @@ -40,6 +40,9 @@ enum DataType { DT_VARIANT = 21; // Arbitrary C++ data types DT_UINT32 = 22; DT_UINT64 = 23; + DT_FLOAT8_E5M2 = 24; // 5 exponent bits, 2 mantissa bits. + DT_FLOAT8_E4M3FN = 25; // 4 exponent bits, 3 mantissa bits, finite-only, with + // 2 NaNs (0bS1111111). // Do not use! These are only for parameters. Every enum above // should have a corresponding value below (verified by types_test). @@ -66,6 +69,8 @@ enum DataType { DT_VARIANT_REF = 121; DT_UINT32_REF = 122; DT_UINT64_REF = 123; + DT_FLOAT8_E5M2_REF = 124; + DT_FLOAT8_E4M3FN_REF = 125; } // DISABLED.ThenChange( // https://www.tensorflow.org/code/tensorflow/c/tf_datatype.h, diff --git a/tensorboard/data/server/descriptor.bin b/tensorboard/data/server/descriptor.bin index 0ac4e114bff1043833c6db73f68a9ffb3a920d59..39dc1c8a09c2ecb60e9ddbfcfaa3304f7e3d75d6 100644 GIT binary patch delta 1930 zcmZ9N%Woq^5XL>-&L-&u(Q2Pf6ruWlZcPb%u2f;+&y%zfjmbf;L|cLzHU zTt6rU?q~c)4)~M1m8$!F9$?-Z=k^^t^VE#EpALQ)V7Iu_;dtGwDMj;{`%rnMlOFk; zy3)+q=O8Xl1@Xkj&0oCH&I|AFN;_wt2RKaG6&%h)jM1EqjsU2*p!0+GkZwrsT^rzsMMsiO3Mwc>x((qidcZ|H`WxoTWKNsD)M z?|u^4We7xa#3e;S zAd(yLvLRbzjMF^v%hVWvdGc~E0x-{g5)5-%AU>H216V-Cb{NP4N=7&>A{ha)h-3u7 zB7#v)O9(~*EFl;Lu!P_^rz-Kv+T#GKh3;p5}BJ-An_xjBcg@T$XOy4l={(3X(HGt{^!Bn0`Ka=L+%NdPxcG6~=Y zN~Sp7Bq6Do0&tUfdJ%w|{-9J$bGk*mZJA30xrH-N1G$AW&v3epzB2%BqwfrW+vq#X z=?=Qd0=R>2vHkJ^T{msm1am-E(9Rr?6||G%w2HoS09Fyq0a!&a&*?51lWy_= z?&9|;58&=-Nct{tx|bv#`q-X3Xy=K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8aX diff --git a/tensorboard/data/server/tensorboard.pb.rs b/tensorboard/data/server/tensorboard.pb.rs index 8bce5d1ccd..ca3e7fc4d2 100644 --- a/tensorboard/data/server/tensorboard.pb.rs +++ b/tensorboard/data/server/tensorboard.pb.rs @@ -111,7 +111,7 @@ pub enum DataType { DtQuint8 = 12, /// Quantized int32 DtQint32 = 13, - /// Float32 truncated to 16 bits. Only for cast ops. + /// Float32 truncated to 16 bits. DtBfloat16 = 14, /// Quantized int16 DtQint16 = 15, @@ -126,6 +126,12 @@ pub enum DataType { DtVariant = 21, DtUint32 = 22, DtUint64 = 23, + /// 5 exponent bits, 2 mantissa bits. + DtFloat8E5m2 = 24, + /// 4 exponent bits, 3 mantissa bits, finite-only, with + DtFloat8E4m3fn = 25, + // 2 NaNs (0bS1111111). + /// Do not use! These are only for parameters. Every enum above /// should have a corresponding value below (verified by types_test). DtFloatRef = 101, @@ -151,6 +157,8 @@ pub enum DataType { DtVariantRef = 121, DtUint32Ref = 122, DtUint64Ref = 123, + DtFloat8E5m2Ref = 124, + DtFloat8E4m3fnRef = 125, } /// Protocol buffer representing a handle to a tensorflow resource. Handles are /// not valid across executions, but can be serialized back and forth from within @@ -262,6 +270,10 @@ pub struct TensorProto { /// DT_UINT64 #[prost(uint64, repeated, tag="17")] pub uint64_val: ::prost::alloc::vec::Vec, + /// DT_FLOAT8_*, use variable-sized set of bytes + /// (i.e. the equivalent of repeated uint8, if such a thing existed). + #[prost(bytes="bytes", tag="18")] + pub float8_val: ::prost::bytes::Bytes, } /// Protocol buffer representing the serialization format of DT_VARIANT tensors. #[derive(Clone, PartialEq, ::prost::Message)] From 42c005894c767b88d97cbc7c0e6113825e46de7d Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 9 Feb 2023 19:54:14 +0000 Subject: [PATCH 3/7] Reverts a change made from our 'sync protos' script that shouldn't have been made. --- tensorboard/compat/proto/BUILD | 1 + 1 file changed, 1 insertion(+) diff --git a/tensorboard/compat/proto/BUILD b/tensorboard/compat/proto/BUILD index 788e9ad69f..ef662dca66 100644 --- a/tensorboard/compat/proto/BUILD +++ b/tensorboard/compat/proto/BUILD @@ -238,6 +238,7 @@ tb_proto_library( tb_proto_library( name = "summary", srcs = ["summary.proto"], + exports = [":histogram"], deps = [ ":histogram", ":tensor", From b23288460e83673e869b033fee9d7a10562b7e1b Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 9 Feb 2023 20:53:01 +0000 Subject: [PATCH 4/7] Updates our CI to run with the tf-nightly pinned to the version right before TF 2.12 branch cut (commit 3e5b6f1899f8515b3f27c67b5bea7481e990c163) --- .github/workflows/ci.yml | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index 6b6c7091e7..c2c6c61a3c 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -27,7 +27,7 @@ env: BUILDTOOLS_VERSION: '3.0.0' BUILDIFIER_SHA256SUM: 'e92a6793c7134c5431c58fbc34700664f101e5c9b1c1fcd93b97978e8b7f88db' BUILDOZER_SHA256SUM: '3d58a0b6972e4535718cdd6c12778170ea7382de7c75bc3728f5719437ffb84d' - TENSORFLOW_VERSION: 'tf-nightly' + TENSORFLOW_VERSION: 'tf-nightly==2.12.0.dev20230201' jobs: build: From c04bee025329482d1d7174a6558ded3d6fd74358 Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 9 Feb 2023 22:32:23 +0000 Subject: [PATCH 5/7] Don't create pip package in CI, it conflicts with newer versions of setuptools. --- .github/workflows/ci.yml | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/.github/workflows/ci.yml b/.github/workflows/ci.yml index c2c6c61a3c..f3b27b0e7a 100644 --- a/.github/workflows/ci.yml +++ b/.github/workflows/ci.yml @@ -115,19 +115,6 @@ jobs: bazel test //tensorboard/summary/writer:event_file_writer_s3_test && bazel test //tensorboard/compat/tensorflow_stub:gfile_fsspec_test && bazel test //tensorboard/summary/writer:event_file_writer_fsspec_test - - name: 'Bazel: build Pip package (with TensorFlow only)' - if: matrix.tf_version_id == 'tf' - run: | - ./tensorboard/tools/update_version.sh - rm -rf /tmp/tb_nightly_pip_package && mkdir /tmp/tb_nightly_pip_package - bazel run //tensorboard/pip_package:build_pip_package -- /tmp/tb_nightly_pip_package - - name: 'Upload Pip package as an artifact (with TensorFlow only)' - # Prevent uploads when running on forks or non-master branch. - if: matrix.tf_version_id == 'tf' && github.repository == 'tensorflow/tensorboard' && github.ref == 'refs/heads/master' - uses: actions/upload-artifact@83fd05a356d7e2593de66fc9913b3002723633cb # v3.1.1 - with: - name: tb-nightly - path: /tmp/tb_nightly_pip_package/* build-data-server-pip: runs-on: ${{ matrix.platform }} From 888d568b302e122c74823a68f81003620d982fe5 Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 9 Feb 2023 21:00:07 +0000 Subject: [PATCH 6/7] Add 2.12.0 relnotes to RELEASE.md --- RELEASE.md | 26 ++++++++++++++++++++++++++ 1 file changed, 26 insertions(+) diff --git a/RELEASE.md b/RELEASE.md index d3de1b5d21..bdbe46f314 100644 --- a/RELEASE.md +++ b/RELEASE.md @@ -1,3 +1,29 @@ +# Release 2.12.0 + +The 2.12 minor series tracks TensorFlow 2.12. + +## Features + +- Time Series dashboard visualization improvements: (#6137) + - Allows selection of a step or range of steps on a scalar chart, and shows a table with data from those steps under it. + - Enables linking the selected steps across all charts in the Time Series dashboard. +- Time Series dashboard now sorts runs in tooltip by pixel distance (matching the Scalars dashboard) (#6116). +- Fast data loading mode (`--load_fast`, aka “RustBoard”) improvements: + - Supports more ways to authenticate to GCS, including GKE service accounts, via `gcp_auth` (#5939, thanks @Corwinpro). + - Now available on `manylinux2014` platforms (#6101, thanks @adamjstewart). + +## Bug Fixes + +- Fixes long standing breakage in standalone version of the Projector visualization (#6069). +- Fixes broken help dialog button in projector plugin (#6024, thanks @mromanelli9). +- Fixes a bug in which a deadlock could cause the event writer to hang (#6168, thanks @crassirostris). + + +## Breaking Changes + +- Drops support for Python 3.7 and marks 3.11 as supported (#6144). +- Drops support for protobuf < 3.19.6 and adds support for 4.x (#6147). + # Release 2.11.0 The 2.11 minor series tracks TensorFlow 2.11. From 7b07bae217326b9eec060986e01ce918a12c25c9 Mon Sep 17 00:00:00 2001 From: Adrian RC Date: Thu, 9 Feb 2023 21:03:49 +0000 Subject: [PATCH 7/7] TensorBoard 2.12.0 --- tensorboard/version.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/tensorboard/version.py b/tensorboard/version.py index d3e7667d80..3f48529683 100644 --- a/tensorboard/version.py +++ b/tensorboard/version.py @@ -15,4 +15,4 @@ """Contains the version string.""" -VERSION = "2.12.0a0" +VERSION = "2.12.0"