diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.8.4_fix-PPC-JIT.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.8.4_fix-PPC-JIT.patch new file mode 100644 index 00000000000..ca57b87dee1 --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.8.4_fix-PPC-JIT.patch @@ -0,0 +1,58 @@ +diff --git a/third_party/cpuinfo/cpuinfo.BUILD b/third_party/cpuinfo/cpuinfo.BUILD +index eb2937d20ef..dfea408db94 100644 +--- a/third_party/cpuinfo/cpuinfo.BUILD ++++ b/third_party/cpuinfo/cpuinfo.BUILD +@@ -109,6 +109,7 @@ cc_library( + ":linux_mips64": COMMON_SRCS + LINUX_SRCS, + ":linux_riscv64": COMMON_SRCS + LINUX_SRCS, + ":linux_s390x": COMMON_SRCS + LINUX_SRCS, ++ ":linux_ppc64le": COMMON_SRCS + LINUX_SRCS, + ":macos_x86_64": COMMON_SRCS + X86_SRCS + MACH_SRCS + MACH_X86_SRCS, + ":macos_arm64": COMMON_SRCS + MACH_SRCS + MACH_ARM_SRCS, + ":windows_x86_64": COMMON_SRCS + X86_SRCS + WINDOWS_X86_SRCS, +@@ -232,6 +233,11 @@ config_setting( + values = {"cpu": "s390x"}, + ) + ++config_setting( ++ name = "linux_ppc64le", ++ values = {"cpu": "ppc"}, ++) ++ + config_setting( + name = "macos_x86_64", + values = { +diff --git a/third_party/llvm/macos_build_fix.patch b/third_party/llvm/macos_build_fix.patch +index 4dba8676ea5..af31f0c1d9e 100644 +--- a/third_party/llvm/macos_build_fix.patch ++++ b/third_party/llvm/macos_build_fix.patch +@@ -42,5 +42,29 @@ index ff64df694048..c9c35b01711c 100644 + "@bazel_tools//src/conditions:linux_aarch64": native_arch_defines("AArch64", "aarch64-unknown-linux-gnu"), + "//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu"), + }) + [ ++ ++ ++From b250c34bbd415b2a8c3e0532e98591ab1780cda6 Mon Sep 17 00:00:00 2001 ++From: Nishidha Panpaliya ++Date: Mon, 21 Mar 2022 09:51:36 -0400 ++Subject: [PATCH] Fix for ppc64le ++ ++--- ++ utils/bazel/llvm-project-overlay/llvm/config.bzl | 1 + ++ 1 file changed, 1 insertion(+) ++ ++diff --git a/utils/bazel/llvm-project-overlay/llvm/config.bzl b/utils/bazel/llvm-project-overlay/llvm/config.bzl ++index 772714f38941..9ed63e8d44a3 100644 ++--- a/utils/bazel/llvm-project-overlay/llvm/config.bzl +++++ b/utils/bazel/llvm-project-overlay/llvm/config.bzl ++@@ -86,6 +86,7 @@ llvm_config_defines = os_defines + select({ ++ "//llvm:macos_arm64": native_arch_defines("AArch64", "arm64-apple-darwin"), ++ "@bazel_tools//src/conditions:darwin": native_arch_defines("X86", "x86_64-unknown-darwin"), ++ "@bazel_tools//src/conditions:linux_aarch64": native_arch_defines("AArch64", "aarch64-unknown-linux-gnu"), +++ "@bazel_tools//src/conditions:linux_ppc64le": native_arch_defines("PowerPC", "powerpc64le-unknown-linux-gnu"), ++ "//conditions:default": native_arch_defines("X86", "x86_64-unknown-linux-gnu"), ++ }) + [ ++ # These shouldn't be needed by the C++11 standard, but are for some ++ + -- + 2.30.1 (Apple Git-130) diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1-foss-2022a-CUDA-11.7.0.eb b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1-foss-2022a-CUDA-11.7.0.eb new file mode 100644 index 00000000000..5c6801151e2 --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1-foss-2022a-CUDA-11.7.0.eb @@ -0,0 +1,253 @@ +easyblock = 'PythonBundle' + +name = 'TensorFlow' +version = '2.9.1' +versionsuffix = '-CUDA-%(cudaver)s' + +homepage = 'https://www.tensorflow.org/' +description = "An open-source software library for Machine Intelligence" + +toolchain = {'name': 'foss', 'version': '2022a'} +toolchainopts = {'pic': True} + +builddependencies = [ + ('Bazel', '5.1.1'), + ('protobuf', '3.19.4'), + # git 2.x required, see also https://github.com/tensorflow/tensorflow/issues/29053 + ('git', '2.36.0', '-nodocs'), + ('pybind11', '2.9.2'), + ('UnZip', '6.0'), + ('LLVM', '14.0.3'), # for debugging with llvm-symbolizer, to be removed +] +dependencies = [ + ('CUDA', '11.7.0', '', SYSTEM), + ('cuDNN', '8.4.1.50', versionsuffix, SYSTEM), + ('NCCL', '2.12.12', versionsuffix), + ('Python', '3.10.4'), + ('h5py', '3.7.0'), + ('cURL', '7.83.0'), + ('dill', '0.3.6'), + ('double-conversion', '3.2.0'), + ('flatbuffers', '2.0.7'), + ('giflib', '5.2.1'), + ('hwloc', '2.7.1'), + ('ICU', '71.1'), + ('JsonCpp', '1.9.5'), + ('libjpeg-turbo', '2.1.3'), + ('LMDB', '0.9.29'), + ('NASM', '2.15.05'), + ('nsync', '1.25.0'), + ('SQLite', '3.38.3'), + ('protobuf-python', '3.19.4'), + ('flatbuffers-python', '2.0'), + ('libpng', '1.6.37'), + ('snappy', '1.1.9'), + ('zlib', '1.2.12'), + ('networkx', '2.8.4'), # required for pythran +] + +use_pip = True +sanity_pip_check = True + +# Dependencies created and updated using findPythonDeps.sh: +# https://gist.github.com/Flamefire/49426e502cd8983757bd01a08a10ae0d +exts_list = [ + ('wrapt', '1.14.1', { + 'checksums': ['380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d'], + }), + ('termcolor', '1.1.0', { + 'checksums': ['1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b'], + }), + ('tensorflow-estimator', '2.9.0', { + 'source_tmpl': 'tensorflow_estimator-%(version)s-py2.py3-none-any.whl', + 'checksums': ['e9762bb302f51bc1eb2f35d19f0190a6a2d809d754d5def788c4328fe3746744'], + }), + ('Werkzeug', '2.2.2', { + 'checksums': ['7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f'], + }), + ('tensorboard-plugin-wit', '1.8.1', { + 'source_tmpl': 'tensorboard_plugin_wit-%(version)s-py3-none-any.whl', + 'checksums': ['ff26bdd583d155aa951ee3b152b3d0cffae8005dc697f72b44a8e8c2a77a8cbe'], + }), + ('tensorboard-data-server', '0.6.1', { + 'source_tmpl': 'tensorboard_data_server-%(version)s-py3-none-any.whl', + 'checksums': ['809fe9887682d35c1f7d1f54f0f40f98bb1f771b14265b453ca051e2ce58fca7'], + }), + ('Markdown', '3.4.1', { + 'checksums': ['3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff'], + }), + ('grpcio', '1.47.0', { + 'modulename': 'grpc', + 'preinstallopts': "export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=%(parallel)s && ", + 'checksums': ['5dbba95fab9b35957b4977b8904fc1fa56b302f9051eff4d7716ebb0c087f801'], + }), + ('oauthlib', '3.2.0', { + 'checksums': ['23a8208d75b902797ea29fd31fa80a15ed9dc2c6c16fe73f5d346f83f6fa27a2'], + }), + ('requests-oauthlib', '1.3.1', { + 'checksums': ['75beac4a47881eeb94d5ea5d6ad31ef88856affe2332b9aafb52c6452ccf0d7a'], + }), + ('rsa', '4.9', { + 'checksums': ['e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21'], + }), + ('pyasn1-modules', '0.2.8', { + 'checksums': ['905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e'], + }), + ('cachetools', '5.2.0', { + 'checksums': ['6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757'], + }), + ('google-auth', '2.10.0', { + 'modulename': 'google.auth', + 'checksums': ['7904dbd44b745c7323fef29565adee2fe7ff48473e2d94443aced40b0404a395'], + }), + ('google-auth-oauthlib', '0.4.6', { + 'checksums': ['a90a072f6993f2c327067bf65270046384cda5a8ecb20b94ea9a687f1f233a7a'], + }), + ('absl-py', '1.2.0', { + 'modulename': 'absl', + 'checksums': ['f568809938c49abbda89826223c992b630afd23c638160ad7840cfe347710d97'], + }), + ('tensorboard', version, { + 'source_tmpl': SOURCE_PY3_WHL, + 'checksums': ['baa727f791776f9e5841d347127720ceed4bbd59c36b40604b95fb2ae6029276'], + }), + ('opt-einsum', '3.3.0', { + 'source_tmpl': 'opt_einsum-%(version)s.tar.gz', + 'checksums': ['59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549'], + }), + ('Keras-Preprocessing', '1.1.2', { + 'source_tmpl': 'Keras_Preprocessing-%(version)s.tar.gz', + 'checksums': ['add82567c50c8bc648c14195bf544a5ce7c1f76761536956c3d2978970179ef3'], + }), + ('keras', '2.9.0', { + 'source_tmpl': SOURCE_WHL, + 'checksums': ['55911256f89cfc9343c9fbe4b61ec45a2d33d89729cbe1ab9dcacf8b07b8b6ab'], + }), + ('google-pasta', '0.2.0', { + 'modulename': 'pasta', + 'checksums': ['c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e'], + }), + ('astunparse', '1.6.3', { + 'checksums': ['5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872'], + }), + # Version <= 0.4.0 required by TF: https://github.com/tensorflow/tensorflow/issues/56244 + ('gast', '0.4.0', { + 'checksums': ['40feb7b8b8434785585ab224d1568b857edb18297e5a3047f1ba012bc83b42c1'], + }), + # (newer) pythran and beniget in SciPy-Bundle require gast 0.5 + ('beniget', '0.3.0', { + 'checksums': ['062c893be9cdf87c3144fb15041cce4d81c67107c1591952cd45fdce789a0ff1'], + }), + ('pythran', '0.9.11', { + 'checksums': ['a317f91e2aade9f6550dc3bf40b5caeb45b7e012daf27e2b3e4ad928edb01667'], + }), + # Required by tests + ('portpicker', '1.5.2', { + 'checksums': ['c55683ad725f5c00a41bc7db0225223e8be024b1fa564d039ed3390e4fd48fb3'], + }), + # System dependencies + ('tblib', '1.7.0', { + 'checksums': ['059bd77306ea7b419d4f76016aef6d7027cc8a0785579b5aad198803435f882c'], + }), + ('astor', '0.8.1', { + 'checksums': ['6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e'], + }), + # Optional profile plugin + dependency + ('gviz-api', '1.10.0', { + 'source_tmpl': 'gviz_api-%(version)s.tar.gz', + 'checksums': ['846692dd8cc73224fc31b18e41589bd934e1cc05090c6576af4b4b26c2e71b90'], + }), + ('tensorboard-plugin-profile', '2.8.0', { + 'source_tmpl': 'tensorboard_plugin_profile-%(version)s.tar.gz', + 'checksums': ['58d65c979951e7628ca3b46c798e10e5813026a3ecfbacc319cf88ebe766134a'], + }), + (name, version, { + 'source_tmpl': 'v%(version)s.tar.gz', + 'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'], + 'patches': [ + 'TensorFlow-2.4.0_add-ldl.patch', + 'TensorFlow-2.4.0_dont-use-var-lock.patch', + 'TensorFlow-2.5.0_add-support-for-large-core-systems.patch', + 'TensorFlow-2.5.0_disable-avx512-extensions.patch', + 'TensorFlow-2.5.0-fix-alias-violation-in-absl.patch', + 'TensorFlow-2.5.0_fix-arm-vector-intrinsics.patch', + 'TensorFlow-2.5.0_fix-crash-on-shutdown.patch', + 'TensorFlow-2.7.1_fix_cpu_count.patch', + 'TensorFlow-2.8.4_exclude-xnnpack-on-ppc.patch', + 'TensorFlow-2.8.4_fix-PPC-JIT.patch', + 'TensorFlow-2.8.4_resolve-gcc-symlinks.patch', + 'TensorFlow-2.9.1_fix-check-for-MKL.patch', + 'TensorFlow-2.9.1_fix-PPC-Eigen-build.patch', + 'TensorFlow-2.9.1_remove-duplicate-gpu-tests.patch', + 'TensorFlow-2.9.1_remove-libclang-and-io-gcs-deps.patch', + 'TensorFlow-2.9.1_support_flatbuffers_2.0.patch', + 'TensorFlow-2.9.1_support_flatbuffers_2.0.6.patch', + ], + 'checksums': [ + {'v2.9.1.tar.gz': '6eaf86ead73e23988fe192da1db68f4d3828bcdd0f3a9dc195935e339c95dbdc'}, + {'TensorFlow-2.4.0_add-ldl.patch': '917ee7282e782e48673596d8917c3207e60e0851bb9acf230a2a439b067af2e3'}, + {'TensorFlow-2.4.0_dont-use-var-lock.patch': + 'b14f2493fd2edf79abd1c4f2dde6c98a3e7d5cb9c25ab9386df874d5f072d6b5'}, + {'TensorFlow-2.5.0_add-support-for-large-core-systems.patch': + '915f3477d6407fafd48269fe1e684a05ce361d9b9b85e58686682df87760f636'}, + {'TensorFlow-2.5.0_disable-avx512-extensions.patch': + '3655ce24c97569ac9738c07cac85347ba6f5c815ada95b19b606ffa46d4dda03'}, + {'TensorFlow-2.5.0-fix-alias-violation-in-absl.patch': + '12454fda3330fb45cd380377e283f04488b40e0b8ae7378e786ddf731a581f75'}, + {'TensorFlow-2.5.0_fix-arm-vector-intrinsics.patch': + '5edea55ce87d5adb14f6ed6996f308879e268b8cec760cf11288e3a56179a029'}, + {'TensorFlow-2.5.0_fix-crash-on-shutdown.patch': + '578c7493221ebd3dc25ca43d63a72cbb28fdf4112b1e2baa7390f25781bd78fd'}, + {'TensorFlow-2.7.1_fix_cpu_count.patch': + '5427a4cff0afc2fe5b24776ae9ca3616c56a79c1fde0025b37bec24837bb0698'}, + {'TensorFlow-2.8.4_exclude-xnnpack-on-ppc.patch': + 'ebd404ac56cc4ca662483f1f591e62e11749361be57a7ba5f4b2f0d03e829884'}, + {'TensorFlow-2.8.4_fix-PPC-JIT.patch': + '27d28293105b4dd0a25f58346c68b672f57215756f14a97c442d0e3317e93a2b'}, + {'TensorFlow-2.8.4_resolve-gcc-symlinks.patch': + '43ce9acc6bffff68a31d2263d0064d272999b2e0a2c6546690287cd1c9c90f04'}, + {'TensorFlow-2.9.1_fix-check-for-MKL.patch': + '3b9d20b43391def093a30dbc45b7502a48916efedf7314700f78cc7b2cc1b645'}, + {'TensorFlow-2.9.1_fix-PPC-Eigen-build.patch': + '5f559a6eade65df665c7c69bc2e5d5d4214b85ea836e966f5dba73211307b972'}, + {'TensorFlow-2.9.1_remove-duplicate-gpu-tests.patch': + '6fe50faab28387c622c68dc3fc0cbfb2a51000cd750c1a82f8420b54fcd2509f'}, + {'TensorFlow-2.9.1_remove-libclang-and-io-gcs-deps.patch': + '13a987ce8e20957d9a618493f6a0e8f67e0f9c8b11596f27bcd7322a8e62113d'}, + {'TensorFlow-2.9.1_support_flatbuffers_2.0.patch': + 'aaf0e0f86ad26f98a2bbb230dc2bbc2fb5f04886ab340049b5eaf3c70ae18f39'}, + {'TensorFlow-2.9.1_support_flatbuffers_2.0.6.patch': + 'b6203d42d68fe42a637499b78e423b66e1310dbc34ef3d1d2d804f8c665997ae'}, + ], + 'test_script': 'TensorFlow-2.x_mnist-test.py', + 'test_tag_filters_cpu': '-gpu,-tpu,-no_cuda_on_cpu_tap,' + '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only', + 'test_tag_filters_gpu': 'gpu,-no_gpu,-nogpu,-gpu_cupti,-no_cuda11,' + '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only', + 'test_targets': [ + '//tensorflow/core/...', + '-//tensorflow/core:example_java_proto', + '-//tensorflow/core/example:example_protos_closure', + '//tensorflow/cc/...', + '//tensorflow/c/...', + '//tensorflow/python/...', + '-//tensorflow/c/eager:c_api_test_gpu', + '-//tensorflow/c/eager:c_api_distributed_test', + '-//tensorflow/c/eager:c_api_distributed_test_gpu', + '-//tensorflow/c/eager:c_api_cluster_test_gpu', + '-//tensorflow/c/eager:c_api_remote_function_test_gpu', + '-//tensorflow/c/eager:c_api_remote_test_gpu', + '-//tensorflow/core/common_runtime:collective_param_resolver_local_test', + '-//tensorflow/core/common_runtime:mkl_layout_pass_test', + '-//tensorflow/core/kernels/mkl:mkl_fused_ops_test', + '-//tensorflow/core/kernels/mkl:mkl_fused_batch_norm_op_test', + '-//tensorflow/core/ir/importexport/tests/roundtrip/...', + ], + 'testopts': "--test_timeout=3600 --test_size_filters=small", + 'testopts_gpu': "--test_timeout=3600 --test_size_filters=small " + "--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute", + 'with_xla': True, + }), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1-foss-2022a.eb b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1-foss-2022a.eb new file mode 100644 index 00000000000..d75ff3264c5 --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1-foss-2022a.eb @@ -0,0 +1,249 @@ +easyblock = 'PythonBundle' + +name = 'TensorFlow' +version = '2.9.1' + +homepage = 'https://www.tensorflow.org/' +description = "An open-source software library for Machine Intelligence" + +toolchain = {'name': 'foss', 'version': '2022a'} +toolchainopts = {'pic': True} + +builddependencies = [ + ('Bazel', '5.1.1'), + ('protobuf', '3.19.4'), + # git 2.x required, see also https://github.com/tensorflow/tensorflow/issues/29053 + ('git', '2.36.0', '-nodocs'), + ('pybind11', '2.9.2'), + ('UnZip', '6.0'), + ('LLVM', '14.0.3'), # for debugging with llvm-symbolizer, to be removed +] +dependencies = [ + ('Python', '3.10.4'), + ('h5py', '3.7.0'), + ('cURL', '7.83.0'), + ('dill', '0.3.6'), + ('double-conversion', '3.2.0'), + ('flatbuffers', '2.0.7'), + ('giflib', '5.2.1'), + ('hwloc', '2.7.1'), + ('ICU', '71.1'), + ('JsonCpp', '1.9.5'), + ('libjpeg-turbo', '2.1.3'), + ('LMDB', '0.9.29'), + ('NASM', '2.15.05'), + ('nsync', '1.25.0'), + ('SQLite', '3.38.3'), + ('protobuf-python', '3.19.4'), + ('flatbuffers-python', '2.0'), + ('libpng', '1.6.37'), + ('snappy', '1.1.9'), + ('zlib', '1.2.12'), + ('networkx', '2.8.4'), # required for pythran +] + +use_pip = True +sanity_pip_check = True + +# Dependencies created and updated using findPythonDeps.sh: +# https://gist.github.com/Flamefire/49426e502cd8983757bd01a08a10ae0d +exts_list = [ + ('wrapt', '1.14.1', { + 'checksums': ['380a85cf89e0e69b7cfbe2ea9f765f004ff419f34194018a6827ac0e3edfed4d'], + }), + ('termcolor', '1.1.0', { + 'checksums': ['1d6d69ce66211143803fbc56652b41d73b4a400a2891d7bf7a1cdf4c02de613b'], + }), + ('tensorflow-estimator', '2.9.0', { + 'source_tmpl': 'tensorflow_estimator-%(version)s-py2.py3-none-any.whl', + 'checksums': ['e9762bb302f51bc1eb2f35d19f0190a6a2d809d754d5def788c4328fe3746744'], + }), + ('Werkzeug', '2.2.2', { + 'checksums': ['7ea2d48322cc7c0f8b3a215ed73eabd7b5d75d0b50e31ab006286ccff9e00b8f'], + }), + ('tensorboard-plugin-wit', '1.8.1', { + 'source_tmpl': 'tensorboard_plugin_wit-%(version)s-py3-none-any.whl', + 'checksums': ['ff26bdd583d155aa951ee3b152b3d0cffae8005dc697f72b44a8e8c2a77a8cbe'], + }), + ('tensorboard-data-server', '0.6.1', { + 'source_tmpl': 'tensorboard_data_server-%(version)s-py3-none-any.whl', + 'checksums': ['809fe9887682d35c1f7d1f54f0f40f98bb1f771b14265b453ca051e2ce58fca7'], + }), + ('Markdown', '3.4.1', { + 'checksums': ['3b809086bb6efad416156e00a0da66fe47618a5d6918dd688f53f40c8e4cfeff'], + }), + ('grpcio', '1.47.0', { + 'modulename': 'grpc', + 'preinstallopts': "export GRPC_PYTHON_BUILD_EXT_COMPILER_JOBS=%(parallel)s && ", + 'checksums': ['5dbba95fab9b35957b4977b8904fc1fa56b302f9051eff4d7716ebb0c087f801'], + }), + ('oauthlib', '3.2.0', { + 'checksums': ['23a8208d75b902797ea29fd31fa80a15ed9dc2c6c16fe73f5d346f83f6fa27a2'], + }), + ('requests-oauthlib', '1.3.1', { + 'checksums': ['75beac4a47881eeb94d5ea5d6ad31ef88856affe2332b9aafb52c6452ccf0d7a'], + }), + ('rsa', '4.9', { + 'checksums': ['e38464a49c6c85d7f1351b0126661487a7e0a14a50f1675ec50eb34d4f20ef21'], + }), + ('pyasn1-modules', '0.2.8', { + 'checksums': ['905f84c712230b2c592c19470d3ca8d552de726050d1d1716282a1f6146be65e'], + }), + ('cachetools', '5.2.0', { + 'checksums': ['6a94c6402995a99c3970cc7e4884bb60b4a8639938157eeed436098bf9831757'], + }), + ('google-auth', '2.10.0', { + 'modulename': 'google.auth', + 'checksums': ['7904dbd44b745c7323fef29565adee2fe7ff48473e2d94443aced40b0404a395'], + }), + ('google-auth-oauthlib', '0.4.6', { + 'checksums': ['a90a072f6993f2c327067bf65270046384cda5a8ecb20b94ea9a687f1f233a7a'], + }), + ('absl-py', '1.2.0', { + 'modulename': 'absl', + 'checksums': ['f568809938c49abbda89826223c992b630afd23c638160ad7840cfe347710d97'], + }), + ('tensorboard', version, { + 'source_tmpl': SOURCE_PY3_WHL, + 'checksums': ['baa727f791776f9e5841d347127720ceed4bbd59c36b40604b95fb2ae6029276'], + }), + ('opt-einsum', '3.3.0', { + 'source_tmpl': 'opt_einsum-%(version)s.tar.gz', + 'checksums': ['59f6475f77bbc37dcf7cd748519c0ec60722e91e63ca114e68821c0c54a46549'], + }), + ('Keras-Preprocessing', '1.1.2', { + 'source_tmpl': 'Keras_Preprocessing-%(version)s.tar.gz', + 'checksums': ['add82567c50c8bc648c14195bf544a5ce7c1f76761536956c3d2978970179ef3'], + }), + ('keras', '2.9.0', { + 'source_tmpl': SOURCE_WHL, + 'checksums': ['55911256f89cfc9343c9fbe4b61ec45a2d33d89729cbe1ab9dcacf8b07b8b6ab'], + }), + ('google-pasta', '0.2.0', { + 'modulename': 'pasta', + 'checksums': ['c9f2c8dfc8f96d0d5808299920721be30c9eec37f2389f28904f454565c8a16e'], + }), + ('astunparse', '1.6.3', { + 'checksums': ['5ad93a8456f0d084c3456d059fd9a92cce667963232cbf763eac3bc5b7940872'], + }), + # Version <= 0.4.0 required by TF: https://github.com/tensorflow/tensorflow/issues/56244 + ('gast', '0.4.0', { + 'checksums': ['40feb7b8b8434785585ab224d1568b857edb18297e5a3047f1ba012bc83b42c1'], + }), + # (newer) pythran and beniget in SciPy-Bundle require gast 0.5 + ('beniget', '0.3.0', { + 'checksums': ['062c893be9cdf87c3144fb15041cce4d81c67107c1591952cd45fdce789a0ff1'], + }), + ('pythran', '0.9.11', { + 'checksums': ['a317f91e2aade9f6550dc3bf40b5caeb45b7e012daf27e2b3e4ad928edb01667'], + }), + # Required by tests + ('portpicker', '1.5.2', { + 'checksums': ['c55683ad725f5c00a41bc7db0225223e8be024b1fa564d039ed3390e4fd48fb3'], + }), + # System dependencies + ('tblib', '1.7.0', { + 'checksums': ['059bd77306ea7b419d4f76016aef6d7027cc8a0785579b5aad198803435f882c'], + }), + ('astor', '0.8.1', { + 'checksums': ['6a6effda93f4e1ce9f618779b2dd1d9d84f1e32812c23a29b3fff6fd7f63fa5e'], + }), + # Optional profile plugin + dependency + ('gviz-api', '1.10.0', { + 'source_tmpl': 'gviz_api-%(version)s.tar.gz', + 'checksums': ['846692dd8cc73224fc31b18e41589bd934e1cc05090c6576af4b4b26c2e71b90'], + }), + ('tensorboard-plugin-profile', '2.8.0', { + 'source_tmpl': 'tensorboard_plugin_profile-%(version)s.tar.gz', + 'checksums': ['58d65c979951e7628ca3b46c798e10e5813026a3ecfbacc319cf88ebe766134a'], + }), + (name, version, { + 'source_tmpl': 'v%(version)s.tar.gz', + 'source_urls': ['https://github.com/tensorflow/tensorflow/archive/'], + 'patches': [ + 'TensorFlow-2.4.0_add-ldl.patch', + 'TensorFlow-2.4.0_dont-use-var-lock.patch', + 'TensorFlow-2.5.0_add-support-for-large-core-systems.patch', + 'TensorFlow-2.5.0_disable-avx512-extensions.patch', + 'TensorFlow-2.5.0-fix-alias-violation-in-absl.patch', + 'TensorFlow-2.5.0_fix-arm-vector-intrinsics.patch', + 'TensorFlow-2.5.0_fix-crash-on-shutdown.patch', + 'TensorFlow-2.7.1_fix_cpu_count.patch', + 'TensorFlow-2.8.4_exclude-xnnpack-on-ppc.patch', + 'TensorFlow-2.8.4_fix-PPC-JIT.patch', + 'TensorFlow-2.8.4_resolve-gcc-symlinks.patch', + 'TensorFlow-2.9.1_fix-check-for-MKL.patch', + 'TensorFlow-2.9.1_fix-PPC-Eigen-build.patch', + 'TensorFlow-2.9.1_remove-duplicate-gpu-tests.patch', + 'TensorFlow-2.9.1_remove-libclang-and-io-gcs-deps.patch', + 'TensorFlow-2.9.1_support_flatbuffers_2.0.patch', + 'TensorFlow-2.9.1_support_flatbuffers_2.0.6.patch', + ], + 'checksums': [ + {'v2.9.1.tar.gz': '6eaf86ead73e23988fe192da1db68f4d3828bcdd0f3a9dc195935e339c95dbdc'}, + {'TensorFlow-2.4.0_add-ldl.patch': '917ee7282e782e48673596d8917c3207e60e0851bb9acf230a2a439b067af2e3'}, + {'TensorFlow-2.4.0_dont-use-var-lock.patch': + 'b14f2493fd2edf79abd1c4f2dde6c98a3e7d5cb9c25ab9386df874d5f072d6b5'}, + {'TensorFlow-2.5.0_add-support-for-large-core-systems.patch': + '915f3477d6407fafd48269fe1e684a05ce361d9b9b85e58686682df87760f636'}, + {'TensorFlow-2.5.0_disable-avx512-extensions.patch': + '3655ce24c97569ac9738c07cac85347ba6f5c815ada95b19b606ffa46d4dda03'}, + {'TensorFlow-2.5.0-fix-alias-violation-in-absl.patch': + '12454fda3330fb45cd380377e283f04488b40e0b8ae7378e786ddf731a581f75'}, + {'TensorFlow-2.5.0_fix-arm-vector-intrinsics.patch': + '5edea55ce87d5adb14f6ed6996f308879e268b8cec760cf11288e3a56179a029'}, + {'TensorFlow-2.5.0_fix-crash-on-shutdown.patch': + '578c7493221ebd3dc25ca43d63a72cbb28fdf4112b1e2baa7390f25781bd78fd'}, + {'TensorFlow-2.7.1_fix_cpu_count.patch': + '5427a4cff0afc2fe5b24776ae9ca3616c56a79c1fde0025b37bec24837bb0698'}, + {'TensorFlow-2.8.4_exclude-xnnpack-on-ppc.patch': + 'ebd404ac56cc4ca662483f1f591e62e11749361be57a7ba5f4b2f0d03e829884'}, + {'TensorFlow-2.8.4_fix-PPC-JIT.patch': + '27d28293105b4dd0a25f58346c68b672f57215756f14a97c442d0e3317e93a2b'}, + {'TensorFlow-2.8.4_resolve-gcc-symlinks.patch': + '43ce9acc6bffff68a31d2263d0064d272999b2e0a2c6546690287cd1c9c90f04'}, + {'TensorFlow-2.9.1_fix-check-for-MKL.patch': + '3b9d20b43391def093a30dbc45b7502a48916efedf7314700f78cc7b2cc1b645'}, + {'TensorFlow-2.9.1_fix-PPC-Eigen-build.patch': + '5f559a6eade65df665c7c69bc2e5d5d4214b85ea836e966f5dba73211307b972'}, + {'TensorFlow-2.9.1_remove-duplicate-gpu-tests.patch': + '6fe50faab28387c622c68dc3fc0cbfb2a51000cd750c1a82f8420b54fcd2509f'}, + {'TensorFlow-2.9.1_remove-libclang-and-io-gcs-deps.patch': + '13a987ce8e20957d9a618493f6a0e8f67e0f9c8b11596f27bcd7322a8e62113d'}, + {'TensorFlow-2.9.1_support_flatbuffers_2.0.patch': + 'aaf0e0f86ad26f98a2bbb230dc2bbc2fb5f04886ab340049b5eaf3c70ae18f39'}, + {'TensorFlow-2.9.1_support_flatbuffers_2.0.6.patch': + 'b6203d42d68fe42a637499b78e423b66e1310dbc34ef3d1d2d804f8c665997ae'}, + ], + 'test_script': 'TensorFlow-2.x_mnist-test.py', + 'test_tag_filters_cpu': '-gpu,-tpu,-no_cuda_on_cpu_tap,' + '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only', + 'test_tag_filters_gpu': 'gpu,-no_gpu,-nogpu,-gpu_cupti,-no_cuda11,' + '-no_pip,-no_oss,-oss_serial,-benchmark-test,-v1only', + 'test_targets': [ + '//tensorflow/core/...', + '-//tensorflow/core:example_java_proto', + '-//tensorflow/core/example:example_protos_closure', + '//tensorflow/cc/...', + '//tensorflow/c/...', + '//tensorflow/python/...', + '-//tensorflow/c/eager:c_api_test_gpu', + '-//tensorflow/c/eager:c_api_distributed_test', + '-//tensorflow/c/eager:c_api_distributed_test_gpu', + '-//tensorflow/c/eager:c_api_cluster_test_gpu', + '-//tensorflow/c/eager:c_api_remote_function_test_gpu', + '-//tensorflow/c/eager:c_api_remote_test_gpu', + '-//tensorflow/core/common_runtime:collective_param_resolver_local_test', + '-//tensorflow/core/common_runtime:mkl_layout_pass_test', + '-//tensorflow/core/kernels/mkl:mkl_fused_ops_test', + '-//tensorflow/core/kernels/mkl:mkl_fused_batch_norm_op_test', + '-//tensorflow/core/ir/importexport/tests/roundtrip/...', + ], + 'testopts': "--test_timeout=3600 --test_size_filters=small", + 'testopts_gpu': "--test_timeout=3600 --test_size_filters=small " + "--run_under=//tensorflow/tools/ci_build/gpu_build:parallel_gpu_execute", + 'with_xla': True, + }), +] + +moduleclass = 'lib' diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_fix-PPC-Eigen-build.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_fix-PPC-Eigen-build.patch new file mode 100644 index 00000000000..7ebb09097df --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_fix-PPC-Eigen-build.patch @@ -0,0 +1,34 @@ +The new Eigen version used in TF 2.9 is not compatible with the custom classes +defined in TF leading to a compile error on PPC: +'class EigenForTFLite::internal::TensorContractionInputMapper, const EigenForTFLite::TensorImagePatchOp<-1, -1, const EigenForTFLite::TensorMap, 16> > >, EigenForTFLite::ThreadPoolDevice>, std::array, std::array, 4, true, false, 0, EigenForTFLite::MakePointer>' has no member named 'load' + +See https://github.com/tensorflow/tensorflow/issues/59212 and https://gitlab.com/libeigen/eigen/-/merge_requests/764#note_1231907378 +This might be easily fixable in more recent versions of TF/Eigen +but for now simply disable the custom TF code for PPC. + +diff --git a/tensorflow/core/kernels/eigen_cuboid_convolution.h b/tensorflow/core/kernels/eigen_cuboid_convolution.h +index 729dcd3bd2a..89f1d5b6732 100644 +--- a/tensorflow/core/kernels/eigen_cuboid_convolution.h ++++ b/tensorflow/core/kernels/eigen_cuboid_convolution.h +@@ -28,7 +28,7 @@ namespace Eigen { + + namespace internal { + +-#if !EIGEN_ALTIVEC_USE_CUSTOM_PACK ++#ifndef EIGEN_VECTORIZE_VSX + // WARNING: Most of the code here implicitly assumes that the matrix is in + // ColMajor layout. This is guaranteed by the tensor contraction (see + // TensorContraction.h). +diff --git a/tensorflow/core/kernels/eigen_spatial_convolutions-inl.h b/tensorflow/core/kernels/eigen_spatial_convolutions-inl.h +index 37a41f952fa..ade41fbf103 100644 +--- a/tensorflow/core/kernels/eigen_spatial_convolutions-inl.h ++++ b/tensorflow/core/kernels/eigen_spatial_convolutions-inl.h +@@ -23,7 +23,7 @@ namespace Eigen { + + namespace internal { + +-#if !EIGEN_ALTIVEC_USE_CUSTOM_PACK ++#ifndef EIGEN_VECTORIZE_VSX + // WARNING: Most of the code here implicitly assumes that the matrix is in + // ColMajor layout. This is guaranteed by the tensor contraction (see + // TensorContraction.h). diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_fix-check-for-MKL.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_fix-check-for-MKL.patch new file mode 100644 index 00000000000..a9c1da7bc9a --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_fix-check-for-MKL.patch @@ -0,0 +1,197 @@ +Tests are incorrectly not skipped causing failures related to MKL. +See https://github.com/tensorflow/tensorflow/issues/59252 + +Use a patch from TF 2.11: https://github.com/tensorflow/tensorflow/commit/5ec3d2e626589540bcfbeb7dac40255034e587df + +Author: Alexander Grund (TU Dresden) + +diff --git a/tensorflow/core/util/BUILD b/tensorflow/core/util/BUILD +index 8881f6fd5e9..25882152abf 100644 +--- a/tensorflow/core/util/BUILD ++++ b/tensorflow/core/util/BUILD +@@ -491,6 +491,11 @@ cc_library( + "//tensorflow/python:__pkg__", + "//tensorflow/python/util:__pkg__", + ], ++ deps = [ ++ "//tensorflow/core/platform:platform_port", ++ "//tensorflow/core/util:env_var", ++ "@com_google_absl//absl/base", ++ ], + alwayslink = 1, + ) + +diff --git a/tensorflow/core/util/port.cc b/tensorflow/core/util/port.cc +index 358b39bfb00..0aa3cfa708e 100644 +--- a/tensorflow/core/util/port.cc ++++ b/tensorflow/core/util/port.cc +@@ -15,6 +15,9 @@ limitations under the License. + + #include "tensorflow/core/util/port.h" + ++#include "absl/base/call_once.h" ++#include "tensorflow/core/platform/cpu_info.h" ++#include "tensorflow/core/util/env_var.h" + + namespace tensorflow { + +@@ -60,10 +63,57 @@ bool GpuSupportsHalfMatMulAndConv() { + } + + bool IsMklEnabled() { +-#if defined(INTEL_MKL) && defined(ENABLE_MKL) +- return true; +-#else ++#ifndef INTEL_MKL + return false; +-#endif // INTEL_MKL && ENABLE_MKL ++#endif ++ static absl::once_flag once; // NOLINT(clang-diagnostic-unreachable-code) ++#ifdef ENABLE_MKL ++ // Keeping TF_DISABLE_MKL env variable for legacy reasons. ++ static bool oneDNN_disabled = false; ++ absl::call_once(once, [&] { ++ TF_CHECK_OK(ReadBoolFromEnvVar("TF_DISABLE_MKL", false, &oneDNN_disabled)); ++ if (oneDNN_disabled) VLOG(2) << "TF-MKL: Disabling oneDNN"; ++ }); ++ return (!oneDNN_disabled); ++#else ++ // Linux: Turn oneDNN on by default for CPUs with neural network features. ++ // Windows: oneDNN is off by default. ++ // No need to guard for other platforms here because INTEL_MKL is only defined ++ // for non-mobile Linux or Windows. ++ static bool oneDNN_enabled = ++#ifdef __linux__ ++ port::TestCPUFeature(port::CPUFeature::AVX512_VNNI) || ++ port::TestCPUFeature(port::CPUFeature::AVX512_BF16) || ++ port::TestCPUFeature(port::CPUFeature::AVX_VNNI) || ++ port::TestCPUFeature(port::CPUFeature::AMX_TILE) || ++ port::TestCPUFeature(port::CPUFeature::AMX_INT8) || ++ port::TestCPUFeature(port::CPUFeature::AMX_BF16); ++#else ++ false; ++#endif // __linux__ ++ absl::call_once(once, [&] { ++ auto status = ReadBoolFromEnvVar("TF_ENABLE_ONEDNN_OPTS", oneDNN_enabled, ++ &oneDNN_enabled); ++ if (!status.ok()) { ++ LOG(WARNING) << "TF_ENABLE_ONEDNN_OPTS is not set to either '0', 'false'," ++ << " '1', or 'true'. Using the default setting: " ++ << oneDNN_enabled; ++ } ++ if (oneDNN_enabled) { ++#ifndef DNNL_AARCH64_USE_ACL ++ LOG(INFO) << "oneDNN custom operations are on. " ++ << "You may see slightly different numerical results due to " ++ << "floating-point round-off errors from different computation " ++ << "orders. To turn them off, set the environment variable " ++ << "`TF_ENABLE_ONEDNN_OPTS=0`."; ++#else ++ LOG(INFO) << "Experimental oneDNN custom operations are on. " ++ << "If you experience issues, please turn them off by setting " ++ << "the environment variable `TF_ENABLE_ONEDNN_OPTS=0`."; ++#endif // !DNNL_AARCH64_USE_ACL ++ } ++ }); ++ return oneDNN_enabled; ++#endif // ENABLE_MKL + } + } // end namespace tensorflow +diff --git a/tensorflow/core/util/util.cc b/tensorflow/core/util/util.cc +index eef2618de91..1c12f552d7d 100644 +--- a/tensorflow/core/util/util.cc ++++ b/tensorflow/core/util/util.cc +@@ -15,16 +15,10 @@ limitations under the License. + + #include "tensorflow/core/util/util.h" + +-#include +-#include +- +-#include "absl/base/call_once.h" +-#include "tensorflow/core/framework/device_factory.h" + #include "tensorflow/core/lib/gtl/inlined_vector.h" + #include "tensorflow/core/lib/strings/strcat.h" +-#include "tensorflow/core/platform/cpu_info.h" + #include "tensorflow/core/platform/logging.h" +-#include "tensorflow/core/util/env_var.h" ++#include "tensorflow/core/util/port.h" + + namespace tensorflow { + +@@ -127,59 +121,7 @@ string SliceDebugString(const TensorShape& shape, const int64_t flat) { + return result; + } + +-bool IsMKLEnabled() { +-#ifndef INTEL_MKL +- return false; +-#endif // !INTEL_MKL +- static absl::once_flag once; +-#ifdef ENABLE_MKL +- // Keeping TF_DISABLE_MKL env variable for legacy reasons. +- static bool oneDNN_disabled = false; +- absl::call_once(once, [&] { +- TF_CHECK_OK(ReadBoolFromEnvVar("TF_DISABLE_MKL", false, &oneDNN_disabled)); +- if (oneDNN_disabled) VLOG(2) << "TF-MKL: Disabling oneDNN"; +- }); +- return (!oneDNN_disabled); +-#else +- // Linux: Turn oneDNN on by default for CPUs with neural network features. +- // Windows: oneDNN is off by default. +- // No need to guard for other platforms here because INTEL_MKL is only defined +- // for non-mobile Linux or Windows. +- static bool oneDNN_enabled = +-#ifdef __linux__ +- port::TestCPUFeature(port::CPUFeature::AVX512_VNNI) || +- port::TestCPUFeature(port::CPUFeature::AVX512_BF16) || +- port::TestCPUFeature(port::CPUFeature::AVX_VNNI) || +- port::TestCPUFeature(port::CPUFeature::AMX_TILE) || +- port::TestCPUFeature(port::CPUFeature::AMX_INT8) || +- port::TestCPUFeature(port::CPUFeature::AMX_BF16); +-#else +- false; +-#endif // __linux__ +- absl::call_once(once, [&] { +- auto status = ReadBoolFromEnvVar("TF_ENABLE_ONEDNN_OPTS", oneDNN_enabled, +- &oneDNN_enabled); +- if (!status.ok()) { +- LOG(WARNING) << "TF_ENABLE_ONEDNN_OPTS is not set to either '0', 'false'," +- << " '1', or 'true'. Using the default setting: " +- << oneDNN_enabled; +- } +- if (oneDNN_enabled) { +-#ifndef DNNL_AARCH64_USE_ACL +- LOG(INFO) << "oneDNN custom operations are on. " +- << "You may see slightly different numerical results due to " +- << "floating-point round-off errors from different computation " +- << "orders. To turn them off, set the environment variable " +- << "`TF_ENABLE_ONEDNN_OPTS=0`."; +-#else +- LOG(INFO) << "Experimental oneDNN custom operations are on. " +- << "If you experience issues, please turn them off by setting " +- << "the environment variable `TF_ENABLE_ONEDNN_OPTS=0`."; +-#endif // !DNNL_AARCH64_USE_ACL +- } +- }); +- return oneDNN_enabled; +-#endif // ENABLE_MKL +-} ++// TODO(penporn): Remove this function from util.cc ++bool IsMKLEnabled() { return IsMklEnabled(); } + + } // namespace tensorflow +diff --git a/tensorflow/python/framework/test_util.py b/tensorflow/python/framework/test_util.py +index 02149d89b2f..e859ec47a1e 100644 +--- a/tensorflow/python/framework/test_util.py ++++ b/tensorflow/python/framework/test_util.py +@@ -359,8 +359,7 @@ def GpuSupportsHalfMatMulAndConv(): + + + def IsMklEnabled(): +- return (_pywrap_util_port.IsMklEnabled() or +- os.getenv("TF_ENABLE_ONEDNN_OPTS", "False").lower() in ["true", "1"]) ++ return _pywrap_util_port.IsMklEnabled() + + + def InstallStackTraceHandler(): diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_remove-libclang-and-io-gcs-deps.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_remove-libclang-and-io-gcs-deps.patch new file mode 100644 index 00000000000..437f45fe5ef --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_remove-libclang-and-io-gcs-deps.patch @@ -0,0 +1,35 @@ +This combines two patches from TensorFlow 2.7.1. + +tensorflow-io-gcs-filesystem is not available as a binary for all architectures and +building it requires TensorFlow to be installed, i.e. there is a cyclic dependency. +As it is not actually required (but optional) remove it from `REQUIRED_PACKAGES`. +See https://github.com/tensorflow/tensorflow/issues/56636 + +libclang was introduced in +https://github.com/tensorflow/tensorflow/commit/c211472000ff57bac7fcec9b0465cf73b37bf135 +> This is in preparation to open-source TF's TFRT backend. +> TFRT generates code using libclang python bindings as part of the build. +Hence it is not currently used and as it is not (easily) available for all architectures +simply remove it. + +Patch added by Simon Branford (University of Birmingham) +Updated by Alexander Grund (TU Dresden) + +--- a/tensorflow/tools/pip_package/setup.py ++++ b/tensorflow/tools/pip_package/setup.py +@@ -83,7 +83,6 @@ REQUIRED_PACKAGES = [ + 'google_pasta >= 0.1.1', + 'h5py >= 2.9.0', + 'keras_preprocessing >= 1.1.1', # 1.1.0 needs tensorflow==1.7 +- 'libclang >= 13.0.0', + 'numpy >= 1.20', + 'opt_einsum >= 2.3.2', + 'packaging', +@@ -100,7 +99,6 @@ REQUIRED_PACKAGES = [ + 'termcolor >= 1.1.0', + 'typing_extensions >= 3.6.6', + 'wrapt >= 1.11.0', +- 'tensorflow-io-gcs-filesystem >= 0.23.1', + # grpcio does not build correctly on big-endian machines due to lack of + # BoringSSL support. + # See https://github.com/tensorflow/tensorflow/issues/17882. diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_support_flatbuffers_2.0.6.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_support_flatbuffers_2.0.6.patch new file mode 100644 index 00000000000..9612f06140a --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_support_flatbuffers_2.0.6.patch @@ -0,0 +1,4901 @@ +Add support for flatbuffers 2.0.6 on top of 2.0 +Taken from https://github.com/tensorflow/tensorflow/commit/3ef396642bb88580b527077cf2d6dc12325085be + +Backported to 2.9.1 by +Author: Alexander Grund (TU Dresden) + +diff --git a/tensorflow/lite/CMakeLists.txt b/tensorflow/lite/CMakeLists.txt +index 40f9485b5d6..5ac317b9c13 100644 +--- a/tensorflow/lite/CMakeLists.txt ++++ b/tensorflow/lite/CMakeLists.txt +@@ -306,6 +306,11 @@ if(TFLITE_ENABLE_GPU) + ${TFLITE_SOURCE_DIR}/tools/versioning/gpu_compatibility.cc + ${TFLITE_SOURCE_DIR}/tools/versioning/op_signature.cc + ) ++ include_directories( ++ AFTER ++ ${TFLITE_SOURCE_DIR}/delegates/gpu/common ++ ${TFLITE_SOURCE_DIR}/delegates/gpu/common/task ++ ) + if(TFLITE_ENABLE_METAL AND "${CMAKE_SYSTEM_NAME}" STREQUAL "Darwin") + # + # libmetal_delegate library +diff --git a/tensorflow/lite/delegates/gpu/cl/compiled_program_cache_generated.h b/tensorflow/lite/delegates/gpu/cl/compiled_program_cache_generated.h +index 8a12bf2a9db..ec0f176b45a 100644 +--- a/tensorflow/lite/delegates/gpu/cl/compiled_program_cache_generated.h ++++ b/tensorflow/lite/delegates/gpu/cl/compiled_program_cache_generated.h +@@ -26,10 +26,13 @@ namespace cl { + namespace data { + + struct Program; ++struct ProgramBuilder; + + struct CompiledCache; ++struct CompiledCacheBuilder; + + struct Program FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { ++ typedef ProgramBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FINGERPRINT = 4, + VT_BINARY = 6 +@@ -42,7 +45,7 @@ struct Program FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FINGERPRINT) && ++ VerifyField(verifier, VT_FINGERPRINT, 8) && + VerifyOffset(verifier, VT_BINARY) && + verifier.VerifyVector(binary()) && + verifier.EndTable(); +@@ -50,6 +53,7 @@ struct Program FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ProgramBuilder { ++ typedef Program Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fingerprint(uint64_t fingerprint) { +@@ -62,7 +66,6 @@ struct ProgramBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ProgramBuilder &operator=(const ProgramBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -92,6 +95,7 @@ inline flatbuffers::Offset CreateProgramDirect( + } + + struct CompiledCache FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { ++ typedef CompiledCacheBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DRIVER_VERSION = 4, + VT_PROGRAMS = 6 +@@ -99,8 +103,8 @@ struct CompiledCache FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *driver_version() const { + return GetPointer(VT_DRIVER_VERSION); + } +- const flatbuffers::Vector> *programs() const { +- return GetPointer> *>(VT_PROGRAMS); ++ const flatbuffers::Vector> *programs() const { ++ return GetPointer> *>(VT_PROGRAMS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +@@ -114,19 +118,19 @@ struct CompiledCache FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CompiledCacheBuilder { ++ typedef CompiledCache Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_driver_version(flatbuffers::Offset driver_version) { + fbb_.AddOffset(CompiledCache::VT_DRIVER_VERSION, driver_version); + } +- void add_programs(flatbuffers::Offset>> programs) { ++ void add_programs(flatbuffers::Offset>> programs) { + fbb_.AddOffset(CompiledCache::VT_PROGRAMS, programs); + } + explicit CompiledCacheBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CompiledCacheBuilder &operator=(const CompiledCacheBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -137,7 +141,7 @@ struct CompiledCacheBuilder { + inline flatbuffers::Offset CreateCompiledCache( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset driver_version = 0, +- flatbuffers::Offset>> programs = 0) { ++ flatbuffers::Offset>> programs = 0) { + CompiledCacheBuilder builder_(_fbb); + builder_.add_programs(programs); + builder_.add_driver_version(driver_version); +@@ -147,9 +151,9 @@ inline flatbuffers::Offset CreateCompiledCache( + inline flatbuffers::Offset CreateCompiledCacheDirect( + flatbuffers::FlatBufferBuilder &_fbb, + const char *driver_version = nullptr, +- const std::vector> *programs = nullptr) { ++ const std::vector> *programs = nullptr) { + auto driver_version__ = driver_version ? _fbb.CreateString(driver_version) : 0; +- auto programs__ = programs ? _fbb.CreateVector>(*programs) : 0; ++ auto programs__ = programs ? _fbb.CreateVector>(*programs) : 0; + return tflite::gpu::cl::data::CreateCompiledCache( + _fbb, + driver_version__, +@@ -173,6 +177,11 @@ inline bool CompiledCacheBufferHasIdentifier(const void *buf) { + buf, CompiledCacheIdentifier()); + } + ++inline bool SizePrefixedCompiledCacheBufferHasIdentifier(const void *buf) { ++ return flatbuffers::BufferHasIdentifier( ++ buf, CompiledCacheIdentifier(), true); ++} ++ + inline bool VerifyCompiledCacheBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(CompiledCacheIdentifier()); +diff --git a/tensorflow/lite/delegates/gpu/cl/serialization_generated.h b/tensorflow/lite/delegates/gpu/cl/serialization_generated.h +index 26691adb44a..aa4affb7ed4 100644 +--- a/tensorflow/lite/delegates/gpu/cl/serialization_generated.h ++++ b/tensorflow/lite/delegates/gpu/cl/serialization_generated.h +@@ -19,8 +19,9 @@ limitations under the License. + #define FLATBUFFERS_GENERATED_SERIALIZATION_TFLITE_GPU_CL_DATA_H_ + + #include "flatbuffers/flatbuffers.h" +-#include "tensorflow/lite/delegates/gpu/common/gpu_model_generated.h" +-#include "tensorflow/lite/delegates/gpu/common/task/serialization_base_generated.h" ++ ++#include "serialization_base_generated.h" ++#include "gpu_model_generated.h" + + namespace tflite { + namespace gpu { +@@ -39,15 +40,18 @@ struct BinaryProgram FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_FINGERPRINT = 4, + VT_BINARY = 6 + }; +- uint64_t fingerprint() const { return GetField(VT_FINGERPRINT, 0); } ++ uint64_t fingerprint() const { ++ return GetField(VT_FINGERPRINT, 0); ++ } + const flatbuffers::Vector *binary() const { + return GetPointer *>(VT_BINARY); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FINGERPRINT) && ++ VerifyField(verifier, VT_FINGERPRINT, 8) && + VerifyOffset(verifier, VT_BINARY) && +- verifier.VerifyVector(binary()) && verifier.EndTable(); ++ verifier.VerifyVector(binary()) && ++ verifier.EndTable(); + } + }; + +@@ -62,7 +66,7 @@ struct BinaryProgramBuilder { + fbb_.AddOffset(BinaryProgram::VT_BINARY, binary); + } + explicit BinaryProgramBuilder(flatbuffers::FlatBufferBuilder &_fbb) +- : fbb_(_fbb) { ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -73,7 +77,8 @@ struct BinaryProgramBuilder { + }; + + inline flatbuffers::Offset CreateBinaryProgram( +- flatbuffers::FlatBufferBuilder &_fbb, uint64_t fingerprint = 0, ++ flatbuffers::FlatBufferBuilder &_fbb, ++ uint64_t fingerprint = 0, + flatbuffers::Offset> binary = 0) { + BinaryProgramBuilder builder_(_fbb); + builder_.add_fingerprint(fingerprint); +@@ -82,11 +87,14 @@ inline flatbuffers::Offset CreateBinaryProgram( + } + + inline flatbuffers::Offset CreateBinaryProgramDirect( +- flatbuffers::FlatBufferBuilder &_fbb, uint64_t fingerprint = 0, ++ flatbuffers::FlatBufferBuilder &_fbb, ++ uint64_t fingerprint = 0, + const std::vector *binary = nullptr) { + auto binary__ = binary ? _fbb.CreateVector(*binary) : 0; +- return tflite::gpu::cl::data::CreateBinaryProgram(_fbb, fingerprint, +- binary__); ++ return tflite::gpu::cl::data::CreateBinaryProgram( ++ _fbb, ++ fingerprint, ++ binary__); + } + + struct InferenceContext FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -104,25 +112,18 @@ struct InferenceContext FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::String *driver_version() const { + return GetPointer(VT_DRIVER_VERSION); + } +- const flatbuffers::Vector< +- flatbuffers::Offset> +- *binary_programs() const { +- return GetPointer> *>( +- VT_BINARY_PROGRAMS); ++ const flatbuffers::Vector> *binary_programs() const { ++ return GetPointer> *>(VT_BINARY_PROGRAMS); + } +- const flatbuffers::Vector> +- *tuned_work_group_sizes_per_node() const { +- return GetPointer> *>( +- VT_TUNED_WORK_GROUP_SIZES_PER_NODE); ++ const flatbuffers::Vector> *tuned_work_group_sizes_per_node() const { ++ return GetPointer> *>(VT_TUNED_WORK_GROUP_SIZES_PER_NODE); + } + const flatbuffers::Vector *fingerprints_per_node() const { +- return GetPointer *>( +- VT_FINGERPRINTS_PER_NODE); ++ return GetPointer *>(VT_FINGERPRINTS_PER_NODE); + } + bool Verify(flatbuffers::Verifier &verifier) const { +- return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_GPU_MODEL) && ++ return VerifyTableStart(verifier) && ++ VerifyOffset(verifier, VT_GPU_MODEL) && + verifier.VerifyTable(gpu_model()) && + VerifyOffset(verifier, VT_DRIVER_VERSION) && + verifier.VerifyString(driver_version()) && +@@ -142,32 +143,20 @@ struct InferenceContextBuilder { + typedef InferenceContext Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_gpu_model( +- flatbuffers::Offset gpu_model) { ++ void add_gpu_model(flatbuffers::Offset gpu_model) { + fbb_.AddOffset(InferenceContext::VT_GPU_MODEL, gpu_model); + } +- void add_driver_version( +- flatbuffers::Offset driver_version) { ++ void add_driver_version(flatbuffers::Offset driver_version) { + fbb_.AddOffset(InferenceContext::VT_DRIVER_VERSION, driver_version); + } +- void add_binary_programs( +- flatbuffers::Offset>> +- binary_programs) { ++ void add_binary_programs(flatbuffers::Offset>> binary_programs) { + fbb_.AddOffset(InferenceContext::VT_BINARY_PROGRAMS, binary_programs); + } +- void add_tuned_work_group_sizes_per_node( +- flatbuffers::Offset< +- flatbuffers::Vector>> +- tuned_work_group_sizes_per_node) { +- fbb_.AddOffset(InferenceContext::VT_TUNED_WORK_GROUP_SIZES_PER_NODE, +- tuned_work_group_sizes_per_node); ++ void add_tuned_work_group_sizes_per_node(flatbuffers::Offset>> tuned_work_group_sizes_per_node) { ++ fbb_.AddOffset(InferenceContext::VT_TUNED_WORK_GROUP_SIZES_PER_NODE, tuned_work_group_sizes_per_node); + } +- void add_fingerprints_per_node( +- flatbuffers::Offset> +- fingerprints_per_node) { +- fbb_.AddOffset(InferenceContext::VT_FINGERPRINTS_PER_NODE, +- fingerprints_per_node); ++ void add_fingerprints_per_node(flatbuffers::Offset> fingerprints_per_node) { ++ fbb_.AddOffset(InferenceContext::VT_FINGERPRINTS_PER_NODE, fingerprints_per_node); + } + explicit InferenceContextBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { +@@ -184,14 +173,9 @@ inline flatbuffers::Offset CreateInferenceContext( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset gpu_model = 0, + flatbuffers::Offset driver_version = 0, +- flatbuffers::Offset>> +- binary_programs = 0, +- flatbuffers::Offset< +- flatbuffers::Vector>> +- tuned_work_group_sizes_per_node = 0, +- flatbuffers::Offset> fingerprints_per_node = +- 0) { ++ flatbuffers::Offset>> binary_programs = 0, ++ flatbuffers::Offset>> tuned_work_group_sizes_per_node = 0, ++ flatbuffers::Offset> fingerprints_per_node = 0) { + InferenceContextBuilder builder_(_fbb); + builder_.add_fingerprints_per_node(fingerprints_per_node); + builder_.add_tuned_work_group_sizes_per_node(tuned_work_group_sizes_per_node); +@@ -205,31 +189,20 @@ inline flatbuffers::Offset CreateInferenceContextDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset gpu_model = 0, + const char *driver_version = nullptr, +- const std::vector> +- *binary_programs = nullptr, +- const std::vector> +- *tuned_work_group_sizes_per_node = nullptr, ++ const std::vector> *binary_programs = nullptr, ++ const std::vector> *tuned_work_group_sizes_per_node = nullptr, + const std::vector *fingerprints_per_node = nullptr) { +- auto driver_version__ = +- driver_version ? _fbb.CreateString(driver_version) : 0; +- auto binary_programs__ = +- binary_programs +- ? _fbb.CreateVector< +- flatbuffers::Offset>( +- *binary_programs) +- : 0; +- auto tuned_work_group_sizes_per_node__ = +- tuned_work_group_sizes_per_node +- ? _fbb.CreateVector>( +- *tuned_work_group_sizes_per_node) +- : 0; +- auto fingerprints_per_node__ = +- fingerprints_per_node +- ? _fbb.CreateVector(*fingerprints_per_node) +- : 0; ++ auto driver_version__ = driver_version ? _fbb.CreateString(driver_version) : 0; ++ auto binary_programs__ = binary_programs ? _fbb.CreateVector>(*binary_programs) : 0; ++ auto tuned_work_group_sizes_per_node__ = tuned_work_group_sizes_per_node ? _fbb.CreateVector>(*tuned_work_group_sizes_per_node) : 0; ++ auto fingerprints_per_node__ = fingerprints_per_node ? _fbb.CreateVector(*fingerprints_per_node) : 0; + return tflite::gpu::cl::data::CreateInferenceContext( +- _fbb, gpu_model, driver_version__, binary_programs__, +- tuned_work_group_sizes_per_node__, fingerprints_per_node__); ++ _fbb, ++ gpu_model, ++ driver_version__, ++ binary_programs__, ++ tuned_work_group_sizes_per_node__, ++ fingerprints_per_node__); + } + + inline const tflite::gpu::cl::data::InferenceContext *GetInferenceContext(const void *buf) { +diff --git a/tensorflow/lite/delegates/gpu/common/gpu_model_generated.h b/tensorflow/lite/delegates/gpu/common/gpu_model_generated.h +index 0f0873b1e44..8cc0d6c75c9 100644 +--- a/tensorflow/lite/delegates/gpu/common/gpu_model_generated.h ++++ b/tensorflow/lite/delegates/gpu/common/gpu_model_generated.h +@@ -18,7 +18,8 @@ limitations under the License. + #define FLATBUFFERS_GENERATED_GPUMODEL_TFLITE_GPU_DATA_H_ + + #include "flatbuffers/flatbuffers.h" +-#include "tensorflow/lite/delegates/gpu/common/task/serialization_base_generated.h" ++ ++#include "serialization_base_generated.h" + + namespace tflite { + namespace gpu { +@@ -45,11 +46,15 @@ struct TensorDescWithId FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const tflite::gpu::data::TensorDescriptor *desc() const { + return GetPointer(VT_DESC); + } +- int32_t id() const { return GetField(VT_ID, 0); } ++ int32_t id() const { ++ return GetField(VT_ID, 0); ++ } + bool Verify(flatbuffers::Verifier &verifier) const { +- return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_DESC) && ++ return VerifyTableStart(verifier) && ++ VerifyOffset(verifier, VT_DESC) && + verifier.VerifyTable(desc()) && +- VerifyField(verifier, VT_ID) && verifier.EndTable(); ++ VerifyField(verifier, VT_ID, 4) && ++ verifier.EndTable(); + } + }; + +@@ -64,7 +69,7 @@ struct TensorDescWithIdBuilder { + fbb_.AddElement(TensorDescWithId::VT_ID, id, 0); + } + explicit TensorDescWithIdBuilder(flatbuffers::FlatBufferBuilder &_fbb) +- : fbb_(_fbb) { ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -90,12 +95,17 @@ struct PairOfValueIds FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_FIRST = 4, + VT_SECOND = 6 + }; +- int32_t first() const { return GetField(VT_FIRST, 0); } +- int32_t second() const { return GetField(VT_SECOND, 0); } ++ int32_t first() const { ++ return GetField(VT_FIRST, 0); ++ } ++ int32_t second() const { ++ return GetField(VT_SECOND, 0); ++ } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FIRST) && +- VerifyField(verifier, VT_SECOND) && verifier.EndTable(); ++ VerifyField(verifier, VT_FIRST, 4) && ++ VerifyField(verifier, VT_SECOND, 4) && ++ verifier.EndTable(); + } + }; + +@@ -110,7 +120,7 @@ struct PairOfValueIdsBuilder { + fbb_.AddElement(PairOfValueIds::VT_SECOND, second, 0); + } + explicit PairOfValueIdsBuilder(flatbuffers::FlatBufferBuilder &_fbb) +- : fbb_(_fbb) { ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -121,7 +131,8 @@ struct PairOfValueIdsBuilder { + }; + + inline flatbuffers::Offset CreatePairOfValueIds( +- flatbuffers::FlatBufferBuilder &_fbb, int32_t first = 0, ++ flatbuffers::FlatBufferBuilder &_fbb, ++ int32_t first = 0, + int32_t second = 0) { + PairOfValueIdsBuilder builder_(_fbb); + builder_.add_second(second); +@@ -150,13 +161,15 @@ struct GpuNode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return GetPointer(VT_NAME); + } + bool Verify(flatbuffers::Verifier &verifier) const { +- return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_GPU_OP) && ++ return VerifyTableStart(verifier) && ++ VerifyOffset(verifier, VT_GPU_OP) && + verifier.VerifyTable(gpu_op()) && + VerifyOffset(verifier, VT_INPUT_IDS) && + verifier.VerifyVector(input_ids()) && + VerifyOffset(verifier, VT_OUTPUT_IDS) && + verifier.VerifyVector(output_ids()) && +- VerifyOffset(verifier, VT_NAME) && verifier.VerifyString(name()) && ++ VerifyOffset(verifier, VT_NAME) && ++ verifier.VerifyString(name()) && + verifier.EndTable(); + } + }; +@@ -168,18 +181,17 @@ struct GpuNodeBuilder { + void add_gpu_op(flatbuffers::Offset gpu_op) { + fbb_.AddOffset(GpuNode::VT_GPU_OP, gpu_op); + } +- void add_input_ids( +- flatbuffers::Offset> input_ids) { ++ void add_input_ids(flatbuffers::Offset> input_ids) { + fbb_.AddOffset(GpuNode::VT_INPUT_IDS, input_ids); + } +- void add_output_ids( +- flatbuffers::Offset> output_ids) { ++ void add_output_ids(flatbuffers::Offset> output_ids) { + fbb_.AddOffset(GpuNode::VT_OUTPUT_IDS, output_ids); + } + void add_name(flatbuffers::Offset name) { + fbb_.AddOffset(GpuNode::VT_NAME, name); + } +- explicit GpuNodeBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { ++ explicit GpuNodeBuilder(flatbuffers::FlatBufferBuilder &_fbb) ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -212,8 +224,12 @@ inline flatbuffers::Offset CreateGpuNodeDirect( + auto input_ids__ = input_ids ? _fbb.CreateVector(*input_ids) : 0; + auto output_ids__ = output_ids ? _fbb.CreateVector(*output_ids) : 0; + auto name__ = name ? _fbb.CreateString(name) : 0; +- return tflite::gpu::data::CreateGpuNode(_fbb, gpu_op, input_ids__, +- output_ids__, name__); ++ return tflite::gpu::data::CreateGpuNode( ++ _fbb, ++ gpu_op, ++ input_ids__, ++ output_ids__, ++ name__); + } + + struct GpuModel FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -228,24 +244,14 @@ struct GpuModel FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_OUTPUT_REFS = 16, + VT_VARIABLE_IDS_AND_REFS = 18 + }; +- const flatbuffers::Vector> +- *nodes() const { +- return GetPointer> *>(VT_NODES); +- } +- const flatbuffers::Vector< +- flatbuffers::Offset> +- *tensors() const { +- return GetPointer> *>( +- VT_TENSORS); +- } +- const flatbuffers::Vector< +- flatbuffers::Offset> +- *const_tensors() const { +- return GetPointer> *>( +- VT_CONST_TENSORS); ++ const flatbuffers::Vector> *nodes() const { ++ return GetPointer> *>(VT_NODES); ++ } ++ const flatbuffers::Vector> *tensors() const { ++ return GetPointer> *>(VT_TENSORS); ++ } ++ const flatbuffers::Vector> *const_tensors() const { ++ return GetPointer> *>(VT_CONST_TENSORS); + } + const flatbuffers::Vector *input_ids() const { + return GetPointer *>(VT_INPUT_IDS); +@@ -259,15 +265,12 @@ struct GpuModel FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const flatbuffers::Vector *output_refs() const { + return GetPointer *>(VT_OUTPUT_REFS); + } +- const flatbuffers::Vector< +- flatbuffers::Offset> +- *variable_ids_and_refs() const { +- return GetPointer> *>( +- VT_VARIABLE_IDS_AND_REFS); ++ const flatbuffers::Vector> *variable_ids_and_refs() const { ++ return GetPointer> *>(VT_VARIABLE_IDS_AND_REFS); + } + bool Verify(flatbuffers::Verifier &verifier) const { +- return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_NODES) && ++ return VerifyTableStart(verifier) && ++ VerifyOffset(verifier, VT_NODES) && + verifier.VerifyVector(nodes()) && + verifier.VerifyVectorOfTables(nodes()) && + VerifyOffset(verifier, VT_TENSORS) && +@@ -295,47 +298,32 @@ struct GpuModelBuilder { + typedef GpuModel Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_nodes( +- flatbuffers::Offset< +- flatbuffers::Vector>> +- nodes) { ++ void add_nodes(flatbuffers::Offset>> nodes) { + fbb_.AddOffset(GpuModel::VT_NODES, nodes); + } +- void add_tensors( +- flatbuffers::Offset>> +- tensors) { ++ void add_tensors(flatbuffers::Offset>> tensors) { + fbb_.AddOffset(GpuModel::VT_TENSORS, tensors); + } +- void add_const_tensors( +- flatbuffers::Offset>> +- const_tensors) { ++ void add_const_tensors(flatbuffers::Offset>> const_tensors) { + fbb_.AddOffset(GpuModel::VT_CONST_TENSORS, const_tensors); + } +- void add_input_ids( +- flatbuffers::Offset> input_ids) { ++ void add_input_ids(flatbuffers::Offset> input_ids) { + fbb_.AddOffset(GpuModel::VT_INPUT_IDS, input_ids); + } +- void add_output_ids( +- flatbuffers::Offset> output_ids) { ++ void add_output_ids(flatbuffers::Offset> output_ids) { + fbb_.AddOffset(GpuModel::VT_OUTPUT_IDS, output_ids); + } +- void add_input_refs( +- flatbuffers::Offset> input_refs) { ++ void add_input_refs(flatbuffers::Offset> input_refs) { + fbb_.AddOffset(GpuModel::VT_INPUT_REFS, input_refs); + } +- void add_output_refs( +- flatbuffers::Offset> output_refs) { ++ void add_output_refs(flatbuffers::Offset> output_refs) { + fbb_.AddOffset(GpuModel::VT_OUTPUT_REFS, output_refs); + } +- void add_variable_ids_and_refs( +- flatbuffers::Offset>> +- variable_ids_and_refs) { ++ void add_variable_ids_and_refs(flatbuffers::Offset>> variable_ids_and_refs) { + fbb_.AddOffset(GpuModel::VT_VARIABLE_IDS_AND_REFS, variable_ids_and_refs); + } +- explicit GpuModelBuilder(flatbuffers::FlatBufferBuilder &_fbb) : fbb_(_fbb) { ++ explicit GpuModelBuilder(flatbuffers::FlatBufferBuilder &_fbb) ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -347,22 +335,14 @@ struct GpuModelBuilder { + + inline flatbuffers::Offset CreateGpuModel( + flatbuffers::FlatBufferBuilder &_fbb, +- flatbuffers::Offset< +- flatbuffers::Vector>> +- nodes = 0, +- flatbuffers::Offset>> +- tensors = 0, +- flatbuffers::Offset>> +- const_tensors = 0, ++ flatbuffers::Offset>> nodes = 0, ++ flatbuffers::Offset>> tensors = 0, ++ flatbuffers::Offset>> const_tensors = 0, + flatbuffers::Offset> input_ids = 0, + flatbuffers::Offset> output_ids = 0, + flatbuffers::Offset> input_refs = 0, + flatbuffers::Offset> output_refs = 0, +- flatbuffers::Offset>> +- variable_ids_and_refs = 0) { ++ flatbuffers::Offset>> variable_ids_and_refs = 0) { + GpuModelBuilder builder_(_fbb); + builder_.add_variable_ids_and_refs(variable_ids_and_refs); + builder_.add_output_refs(output_refs); +@@ -377,48 +357,32 @@ inline flatbuffers::Offset CreateGpuModel( + + inline flatbuffers::Offset CreateGpuModelDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- const std::vector> *nodes = +- nullptr, +- const std::vector> +- *tensors = nullptr, +- const std::vector> +- *const_tensors = nullptr, ++ const std::vector> *nodes = nullptr, ++ const std::vector> *tensors = nullptr, ++ const std::vector> *const_tensors = nullptr, + const std::vector *input_ids = nullptr, + const std::vector *output_ids = nullptr, + const std::vector *input_refs = nullptr, + const std::vector *output_refs = nullptr, +- const std::vector> +- *variable_ids_and_refs = nullptr) { +- auto nodes__ = +- nodes +- ? _fbb.CreateVector>( +- *nodes) +- : 0; +- auto tensors__ = +- tensors ? _fbb.CreateVector< +- flatbuffers::Offset>( +- *tensors) +- : 0; +- auto const_tensors__ = +- const_tensors +- ? _fbb.CreateVector< +- flatbuffers::Offset>( +- *const_tensors) +- : 0; ++ const std::vector> *variable_ids_and_refs = nullptr) { ++ auto nodes__ = nodes ? _fbb.CreateVector>(*nodes) : 0; ++ auto tensors__ = tensors ? _fbb.CreateVector>(*tensors) : 0; ++ auto const_tensors__ = const_tensors ? _fbb.CreateVector>(*const_tensors) : 0; + auto input_ids__ = input_ids ? _fbb.CreateVector(*input_ids) : 0; + auto output_ids__ = output_ids ? _fbb.CreateVector(*output_ids) : 0; + auto input_refs__ = input_refs ? _fbb.CreateVector(*input_refs) : 0; +- auto output_refs__ = +- output_refs ? _fbb.CreateVector(*output_refs) : 0; +- auto variable_ids_and_refs__ = +- variable_ids_and_refs +- ? _fbb.CreateVector< +- flatbuffers::Offset>( +- *variable_ids_and_refs) +- : 0; ++ auto output_refs__ = output_refs ? _fbb.CreateVector(*output_refs) : 0; ++ auto variable_ids_and_refs__ = variable_ids_and_refs ? _fbb.CreateVector>(*variable_ids_and_refs) : 0; + return tflite::gpu::data::CreateGpuModel( +- _fbb, nodes__, tensors__, const_tensors__, input_ids__, output_ids__, +- input_refs__, output_refs__, variable_ids_and_refs__); ++ _fbb, ++ nodes__, ++ tensors__, ++ const_tensors__, ++ input_ids__, ++ output_ids__, ++ input_refs__, ++ output_refs__, ++ variable_ids_and_refs__); + } + + } // namespace data +diff --git a/tensorflow/lite/delegates/gpu/common/task/serialization_base_generated.h b/tensorflow/lite/delegates/gpu/common/task/serialization_base_generated.h +index a8f7b714e80..c2bd14c3c1a 100644 +--- a/tensorflow/lite/delegates/gpu/common/task/serialization_base_generated.h ++++ b/tensorflow/lite/delegates/gpu/common/task/serialization_base_generated.h +@@ -139,17 +139,38 @@ enum class DataType : int8_t { + + inline const DataType (&EnumValuesDataType())[12] { + static const DataType values[] = { +- DataType::UNKNOWN, DataType::FLOAT16, DataType::FLOAT32, +- DataType::FLOAT64, DataType::UINT8, DataType::INT8, +- DataType::UINT16, DataType::INT16, DataType::UINT32, +- DataType::INT32, DataType::UINT64, DataType::INT64}; ++ DataType::UNKNOWN, ++ DataType::FLOAT16, ++ DataType::FLOAT32, ++ DataType::FLOAT64, ++ DataType::UINT8, ++ DataType::INT8, ++ DataType::UINT16, ++ DataType::INT16, ++ DataType::UINT32, ++ DataType::INT32, ++ DataType::UINT64, ++ DataType::INT64 ++ }; + return values; + } + + inline const char * const *EnumNamesDataType() { +- static const char *const names[13] = { +- "UNKNOWN", "FLOAT16", "FLOAT32", "FLOAT64", "UINT8", "INT8", "UINT16", +- "INT16", "UINT32", "INT32", "UINT64", "INT64", nullptr}; ++ static const char * const names[13] = { ++ "UNKNOWN", ++ "FLOAT16", ++ "FLOAT32", ++ "FLOAT64", ++ "UINT8", ++ "INT8", ++ "UINT16", ++ "INT16", ++ "UINT32", ++ "INT32", ++ "UINT64", ++ "INT64", ++ nullptr ++ }; + return names; + } + +@@ -315,21 +336,26 @@ enum class CalculationsPrecision : int8_t { + }; + + inline const CalculationsPrecision (&EnumValuesCalculationsPrecision())[3] { +- static const CalculationsPrecision values[] = {CalculationsPrecision::F32, +- CalculationsPrecision::F32_F16, +- CalculationsPrecision::F16}; ++ static const CalculationsPrecision values[] = { ++ CalculationsPrecision::F32, ++ CalculationsPrecision::F32_F16, ++ CalculationsPrecision::F16 ++ }; + return values; + } + +-inline const char *const *EnumNamesCalculationsPrecision() { +- static const char *const names[4] = {"F32", "F32_F16", "F16", nullptr}; ++inline const char * const *EnumNamesCalculationsPrecision() { ++ static const char * const names[4] = { ++ "F32", ++ "F32_F16", ++ "F16", ++ nullptr ++ }; + return names; + } + + inline const char *EnumNameCalculationsPrecision(CalculationsPrecision e) { +- if (flatbuffers::IsOutRange(e, CalculationsPrecision::F32, +- CalculationsPrecision::F16)) +- return ""; ++ if (flatbuffers::IsOutRange(e, CalculationsPrecision::F32, CalculationsPrecision::F16)) return ""; + const size_t index = static_cast(e); + return EnumNamesCalculationsPrecision()[index]; + } +@@ -346,26 +372,29 @@ enum class TensorToGrid : int8_t { + + inline const TensorToGrid (&EnumValuesTensorToGrid())[5] { + static const TensorToGrid values[] = { +- TensorToGrid::CUSTOM, TensorToGrid::WB_TO_X_HD_TO_Y_S_TO_Z, +- TensorToGrid::WB_TO_X_HD_TO_Y_Z_IS_1, TensorToGrid::WB_TO_X_H_TO_Y_D_TO_Z, +- TensorToGrid::B_TO_X_Y_IS_1_Z_IS_1}; ++ TensorToGrid::CUSTOM, ++ TensorToGrid::WB_TO_X_HD_TO_Y_S_TO_Z, ++ TensorToGrid::WB_TO_X_HD_TO_Y_Z_IS_1, ++ TensorToGrid::WB_TO_X_H_TO_Y_D_TO_Z, ++ TensorToGrid::B_TO_X_Y_IS_1_Z_IS_1 ++ }; + return values; + } + +-inline const char *const *EnumNamesTensorToGrid() { +- static const char *const names[6] = {"CUSTOM", +- "WB_TO_X_HD_TO_Y_S_TO_Z", +- "WB_TO_X_HD_TO_Y_Z_IS_1", +- "WB_TO_X_H_TO_Y_D_TO_Z", +- "B_TO_X_Y_IS_1_Z_IS_1", +- nullptr}; ++inline const char * const *EnumNamesTensorToGrid() { ++ static const char * const names[6] = { ++ "CUSTOM", ++ "WB_TO_X_HD_TO_Y_S_TO_Z", ++ "WB_TO_X_HD_TO_Y_Z_IS_1", ++ "WB_TO_X_H_TO_Y_D_TO_Z", ++ "B_TO_X_Y_IS_1_Z_IS_1", ++ nullptr ++ }; + return names; + } + + inline const char *EnumNameTensorToGrid(TensorToGrid e) { +- if (flatbuffers::IsOutRange(e, TensorToGrid::CUSTOM, +- TensorToGrid::B_TO_X_Y_IS_1_Z_IS_1)) +- return ""; ++ if (flatbuffers::IsOutRange(e, TensorToGrid::CUSTOM, TensorToGrid::B_TO_X_Y_IS_1_Z_IS_1)) return ""; + const size_t index = static_cast(e); + return EnumNamesTensorToGrid()[index]; + } +@@ -383,30 +412,31 @@ enum class CompilerOptions : int8_t { + + inline const CompilerOptions (&EnumValuesCompilerOptions())[6] { + static const CompilerOptions values[] = { +- CompilerOptions::ADRENO_FULL_SIMD_LINE, +- CompilerOptions::ADRENO_MORE_WAVES, +- CompilerOptions::CL_FAST_RELAXED_MATH, +- CompilerOptions::CL_OPT_DISABLE, +- CompilerOptions::CL_2_0, +- CompilerOptions::CL_3_0}; ++ CompilerOptions::ADRENO_FULL_SIMD_LINE, ++ CompilerOptions::ADRENO_MORE_WAVES, ++ CompilerOptions::CL_FAST_RELAXED_MATH, ++ CompilerOptions::CL_OPT_DISABLE, ++ CompilerOptions::CL_2_0, ++ CompilerOptions::CL_3_0 ++ }; + return values; + } + +-inline const char *const *EnumNamesCompilerOptions() { +- static const char *const names[7] = {"ADRENO_FULL_SIMD_LINE", +- "ADRENO_MORE_WAVES", +- "CL_FAST_RELAXED_MATH", +- "CL_OPT_DISABLE", +- "CL_2_0", +- "CL_3_0", +- nullptr}; ++inline const char * const *EnumNamesCompilerOptions() { ++ static const char * const names[7] = { ++ "ADRENO_FULL_SIMD_LINE", ++ "ADRENO_MORE_WAVES", ++ "CL_FAST_RELAXED_MATH", ++ "CL_OPT_DISABLE", ++ "CL_2_0", ++ "CL_3_0", ++ nullptr ++ }; + return names; + } + + inline const char *EnumNameCompilerOptions(CompilerOptions e) { +- if (flatbuffers::IsOutRange(e, CompilerOptions::ADRENO_FULL_SIMD_LINE, +- CompilerOptions::CL_3_0)) +- return ""; ++ if (flatbuffers::IsOutRange(e, CompilerOptions::ADRENO_FULL_SIMD_LINE, CompilerOptions::CL_3_0)) return ""; + const size_t index = static_cast(e); + return EnumNamesCompilerOptions()[index]; + } +@@ -433,10 +463,10 @@ struct Int4 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_X) && +- VerifyField(verifier, VT_Y) && +- VerifyField(verifier, VT_Z) && +- VerifyField(verifier, VT_W) && ++ VerifyField(verifier, VT_X, 4) && ++ VerifyField(verifier, VT_Y, 4) && ++ VerifyField(verifier, VT_Z, 4) && ++ VerifyField(verifier, VT_W, 4) && + verifier.EndTable(); + } + }; +@@ -500,9 +530,9 @@ struct Int3 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_X) && +- VerifyField(verifier, VT_Y) && +- VerifyField(verifier, VT_Z) && ++ VerifyField(verifier, VT_X, 4) && ++ VerifyField(verifier, VT_Y, 4) && ++ VerifyField(verifier, VT_Z, 4) && + verifier.EndTable(); + } + }; +@@ -557,8 +587,8 @@ struct Int2 FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_X) && +- VerifyField(verifier, VT_Y) && ++ VerifyField(verifier, VT_X, 4) && ++ VerifyField(verifier, VT_Y, 4) && + verifier.EndTable(); + } + }; +@@ -676,7 +706,7 @@ struct GPUObjectDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + VerifyOffset(verifier, VT_STATE_VARS) && + verifier.VerifyVector(state_vars()) && + verifier.VerifyVectorOfTables(state_vars()) && +- VerifyField(verifier, VT_ACCESS_TYPE) && ++ VerifyField(verifier, VT_ACCESS_TYPE, 1) && + verifier.EndTable(); + } + }; +@@ -743,8 +773,8 @@ struct IntValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && +- VerifyField(verifier, VT_VALUE) && +- VerifyField(verifier, VT_ACTIVE) && ++ VerifyField(verifier, VT_VALUE, 4) && ++ VerifyField(verifier, VT_ACTIVE, 1) && + verifier.EndTable(); + } + }; +@@ -818,8 +848,8 @@ struct FloatValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && +- VerifyField(verifier, VT_VALUE) && +- VerifyField(verifier, VT_ACTIVE) && ++ VerifyField(verifier, VT_VALUE, 4) && ++ VerifyField(verifier, VT_ACTIVE, 1) && + verifier.EndTable(); + } + }; +@@ -893,8 +923,8 @@ struct HalfValue FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && +- VerifyField(verifier, VT_VALUE) && +- VerifyField(verifier, VT_ACTIVE) && ++ VerifyField(verifier, VT_VALUE, 4) && ++ VerifyField(verifier, VT_ACTIVE, 1) && + verifier.EndTable(); + } + }; +@@ -984,13 +1014,13 @@ struct BufferDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_BASE_OBJ) && + verifier.VerifyTable(base_obj()) && +- VerifyField(verifier, VT_ELEMENT_TYPE) && +- VerifyField(verifier, VT_ELEMENT_SIZE) && +- VerifyField(verifier, VT_MEMORY_TYPE) && ++ VerifyField(verifier, VT_ELEMENT_TYPE, 1) && ++ VerifyField(verifier, VT_ELEMENT_SIZE, 4) && ++ VerifyField(verifier, VT_MEMORY_TYPE, 1) && + VerifyOffset(verifier, VT_ATTRIBUTES) && + verifier.VerifyVector(attributes()) && + verifier.VerifyVectorOfStrings(attributes()) && +- VerifyField(verifier, VT_SIZE) && ++ VerifyField(verifier, VT_SIZE, 4) && + VerifyOffset(verifier, VT_DATA) && + verifier.VerifyVector(data()) && + verifier.EndTable(); +@@ -1107,9 +1137,9 @@ struct Texture2DDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_BASE_OBJ) && + verifier.VerifyTable(base_obj()) && +- VerifyField(verifier, VT_ELEMENT_TYPE) && +- VerifyField(verifier, VT_NORMALIZED) && +- VerifyField(verifier, VT_NORMALIZED_TYPE) && ++ VerifyField(verifier, VT_ELEMENT_TYPE, 1) && ++ VerifyField(verifier, VT_NORMALIZED, 1) && ++ VerifyField(verifier, VT_NORMALIZED_TYPE, 1) && + VerifyOffset(verifier, VT_SIZE) && + verifier.VerifyTable(size()) && + VerifyOffset(verifier, VT_DATA) && +@@ -1220,10 +1250,10 @@ struct TensorLinearDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_BASE_OBJ) && + verifier.VerifyTable(base_obj()) && +- VerifyField(verifier, VT_STORAGE_TYPE) && +- VerifyField(verifier, VT_ELEMENT_TYPE) && +- VerifyField(verifier, VT_MEMORY_TYPE) && +- VerifyField(verifier, VT_SIZE) && ++ VerifyField(verifier, VT_STORAGE_TYPE, 1) && ++ VerifyField(verifier, VT_ELEMENT_TYPE, 1) && ++ VerifyField(verifier, VT_MEMORY_TYPE, 1) && ++ VerifyField(verifier, VT_SIZE, 4) && + VerifyOffset(verifier, VT_DATA) && + verifier.VerifyVector(data()) && + verifier.EndTable(); +@@ -1326,11 +1356,11 @@ struct BHWDC FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_B) && +- VerifyField(verifier, VT_H) && +- VerifyField(verifier, VT_W) && +- VerifyField(verifier, VT_D) && +- VerifyField(verifier, VT_C) && ++ VerifyField(verifier, VT_B, 4) && ++ VerifyField(verifier, VT_H, 4) && ++ VerifyField(verifier, VT_W, 4) && ++ VerifyField(verifier, VT_D, 4) && ++ VerifyField(verifier, VT_C, 4) && + verifier.EndTable(); + } + }; +@@ -1418,17 +1448,18 @@ struct TensorDescriptor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return GetField(VT_USE_BUFFER_FOR_WRITE_ONLY_IMAGE_BUFFER, 0) != 0; + } + bool Verify(flatbuffers::Verifier &verifier) const { +- return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_BASE_OBJ) && ++ return VerifyTableStart(verifier) && ++ VerifyOffset(verifier, VT_BASE_OBJ) && + verifier.VerifyTable(base_obj()) && +- VerifyField(verifier, VT_DATA_TYPE) && +- VerifyField(verifier, VT_STORAGE_TYPE) && +- VerifyField(verifier, VT_LAYOUT) && +- VerifyOffset(verifier, VT_SHAPE) && verifier.VerifyTable(shape()) && +- VerifyOffset(verifier, VT_DATA) && verifier.VerifyVector(data()) && +- VerifyField(verifier, +- VT_USE_BUFFER_FOR_WRITE_ONLY_2D_TEXTURE) && +- VerifyField(verifier, +- VT_USE_BUFFER_FOR_WRITE_ONLY_IMAGE_BUFFER) && ++ VerifyField(verifier, VT_DATA_TYPE, 1) && ++ VerifyField(verifier, VT_STORAGE_TYPE, 1) && ++ VerifyField(verifier, VT_LAYOUT, 1) && ++ VerifyOffset(verifier, VT_SHAPE) && ++ verifier.VerifyTable(shape()) && ++ VerifyOffset(verifier, VT_DATA) && ++ verifier.VerifyVector(data()) && ++ VerifyField(verifier, VT_USE_BUFFER_FOR_WRITE_ONLY_2D_TEXTURE, 1) && ++ VerifyField(verifier, VT_USE_BUFFER_FOR_WRITE_ONLY_IMAGE_BUFFER, 1) && + verifier.EndTable(); + } + }; +@@ -1455,17 +1486,11 @@ struct TensorDescriptorBuilder { + void add_data(flatbuffers::Offset> data) { + fbb_.AddOffset(TensorDescriptor::VT_DATA, data); + } +- void add_use_buffer_for_write_only_2d_texture( +- bool use_buffer_for_write_only_2d_texture) { +- fbb_.AddElement( +- TensorDescriptor::VT_USE_BUFFER_FOR_WRITE_ONLY_2D_TEXTURE, +- static_cast(use_buffer_for_write_only_2d_texture), 0); ++ void add_use_buffer_for_write_only_2d_texture(bool use_buffer_for_write_only_2d_texture) { ++ fbb_.AddElement(TensorDescriptor::VT_USE_BUFFER_FOR_WRITE_ONLY_2D_TEXTURE, static_cast(use_buffer_for_write_only_2d_texture), 0); + } +- void add_use_buffer_for_write_only_image_buffer( +- bool use_buffer_for_write_only_image_buffer) { +- fbb_.AddElement( +- TensorDescriptor::VT_USE_BUFFER_FOR_WRITE_ONLY_IMAGE_BUFFER, +- static_cast(use_buffer_for_write_only_image_buffer), 0); ++ void add_use_buffer_for_write_only_image_buffer(bool use_buffer_for_write_only_image_buffer) { ++ fbb_.AddElement(TensorDescriptor::VT_USE_BUFFER_FOR_WRITE_ONLY_IMAGE_BUFFER, static_cast(use_buffer_for_write_only_image_buffer), 0); + } + explicit TensorDescriptorBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { +@@ -1481,10 +1506,8 @@ struct TensorDescriptorBuilder { + inline flatbuffers::Offset CreateTensorDescriptor( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset base_obj = 0, +- tflite::gpu::data::DataType data_type = +- tflite::gpu::data::DataType::UNKNOWN, +- tflite::gpu::data::TensorStorageType storage_type = +- tflite::gpu::data::TensorStorageType::UNKNOWN, ++ tflite::gpu::data::DataType data_type = tflite::gpu::data::DataType::UNKNOWN, ++ tflite::gpu::data::TensorStorageType storage_type = tflite::gpu::data::TensorStorageType::UNKNOWN, + tflite::gpu::data::Layout layout = tflite::gpu::data::Layout::UNKNOWN, + flatbuffers::Offset shape = 0, + flatbuffers::Offset> data = 0, +@@ -1494,10 +1517,8 @@ inline flatbuffers::Offset CreateTensorDescriptor( + builder_.add_data(data); + builder_.add_shape(shape); + builder_.add_base_obj(base_obj); +- builder_.add_use_buffer_for_write_only_image_buffer( +- use_buffer_for_write_only_image_buffer); +- builder_.add_use_buffer_for_write_only_2d_texture( +- use_buffer_for_write_only_2d_texture); ++ builder_.add_use_buffer_for_write_only_image_buffer(use_buffer_for_write_only_image_buffer); ++ builder_.add_use_buffer_for_write_only_2d_texture(use_buffer_for_write_only_2d_texture); + builder_.add_layout(layout); + builder_.add_storage_type(storage_type); + builder_.add_data_type(data_type); +@@ -1507,10 +1528,8 @@ inline flatbuffers::Offset CreateTensorDescriptor( + inline flatbuffers::Offset CreateTensorDescriptorDirect( + flatbuffers::FlatBufferBuilder &_fbb, + flatbuffers::Offset base_obj = 0, +- tflite::gpu::data::DataType data_type = +- tflite::gpu::data::DataType::UNKNOWN, +- tflite::gpu::data::TensorStorageType storage_type = +- tflite::gpu::data::TensorStorageType::UNKNOWN, ++ tflite::gpu::data::DataType data_type = tflite::gpu::data::DataType::UNKNOWN, ++ tflite::gpu::data::TensorStorageType storage_type = tflite::gpu::data::TensorStorageType::UNKNOWN, + tflite::gpu::data::Layout layout = tflite::gpu::data::Layout::UNKNOWN, + flatbuffers::Offset shape = 0, + const std::vector *data = nullptr, +@@ -1518,7 +1537,13 @@ inline flatbuffers::Offset CreateTensorDescriptorDirect( + bool use_buffer_for_write_only_image_buffer = false) { + auto data__ = data ? _fbb.CreateVector(*data) : 0; + return tflite::gpu::data::CreateTensorDescriptor( +- _fbb, base_obj, data_type, storage_type, layout, shape, data__, ++ _fbb, ++ base_obj, ++ data_type, ++ storage_type, ++ layout, ++ shape, ++ data__, + use_buffer_for_write_only_2d_texture, + use_buffer_for_write_only_image_buffer); + } +@@ -1989,32 +2014,24 @@ struct OperationDef FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_DST_TENSORS = 8 + }; + tflite::gpu::data::CalculationsPrecision precision() const { +- return static_cast( +- GetField(VT_PRECISION, 0)); +- } +- const flatbuffers::Vector< +- flatbuffers::Offset> +- *src_tensors() const { +- return GetPointer> *>( +- VT_SRC_TENSORS); +- } +- const flatbuffers::Vector< +- flatbuffers::Offset> +- *dst_tensors() const { +- return GetPointer> *>( +- VT_DST_TENSORS); ++ return static_cast(GetField(VT_PRECISION, 0)); ++ } ++ const flatbuffers::Vector> *src_tensors() const { ++ return GetPointer> *>(VT_SRC_TENSORS); ++ } ++ const flatbuffers::Vector> *dst_tensors() const { ++ return GetPointer> *>(VT_DST_TENSORS); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PRECISION) && ++ VerifyField(verifier, VT_PRECISION, 1) && + VerifyOffset(verifier, VT_SRC_TENSORS) && + verifier.VerifyVector(src_tensors()) && + verifier.VerifyVectorOfTables(src_tensors()) && + VerifyOffset(verifier, VT_DST_TENSORS) && + verifier.VerifyVector(dst_tensors()) && +- verifier.VerifyVectorOfTables(dst_tensors()) && verifier.EndTable(); ++ verifier.VerifyVectorOfTables(dst_tensors()) && ++ verifier.EndTable(); + } + }; + +@@ -2023,23 +2040,16 @@ struct OperationDefBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_precision(tflite::gpu::data::CalculationsPrecision precision) { +- fbb_.AddElement(OperationDef::VT_PRECISION, +- static_cast(precision), 0); ++ fbb_.AddElement(OperationDef::VT_PRECISION, static_cast(precision), 0); + } +- void add_src_tensors( +- flatbuffers::Offset>> +- src_tensors) { ++ void add_src_tensors(flatbuffers::Offset>> src_tensors) { + fbb_.AddOffset(OperationDef::VT_SRC_TENSORS, src_tensors); + } +- void add_dst_tensors( +- flatbuffers::Offset>> +- dst_tensors) { ++ void add_dst_tensors(flatbuffers::Offset>> dst_tensors) { + fbb_.AddOffset(OperationDef::VT_DST_TENSORS, dst_tensors); + } + explicit OperationDefBuilder(flatbuffers::FlatBufferBuilder &_fbb) +- : fbb_(_fbb) { ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -2051,14 +2061,9 @@ struct OperationDefBuilder { + + inline flatbuffers::Offset CreateOperationDef( + flatbuffers::FlatBufferBuilder &_fbb, +- tflite::gpu::data::CalculationsPrecision precision = +- tflite::gpu::data::CalculationsPrecision::F32, +- flatbuffers::Offset>> +- src_tensors = 0, +- flatbuffers::Offset>> +- dst_tensors = 0) { ++ tflite::gpu::data::CalculationsPrecision precision = tflite::gpu::data::CalculationsPrecision::F32, ++ flatbuffers::Offset>> src_tensors = 0, ++ flatbuffers::Offset>> dst_tensors = 0) { + OperationDefBuilder builder_(_fbb); + builder_.add_dst_tensors(dst_tensors); + builder_.add_src_tensors(src_tensors); +@@ -2068,26 +2073,16 @@ inline flatbuffers::Offset CreateOperationDef( + + inline flatbuffers::Offset CreateOperationDefDirect( + flatbuffers::FlatBufferBuilder &_fbb, +- tflite::gpu::data::CalculationsPrecision precision = +- tflite::gpu::data::CalculationsPrecision::F32, +- const std::vector> +- *src_tensors = nullptr, +- const std::vector> +- *dst_tensors = nullptr) { +- auto src_tensors__ = +- src_tensors +- ? _fbb.CreateVector< +- flatbuffers::Offset>( +- *src_tensors) +- : 0; +- auto dst_tensors__ = +- dst_tensors +- ? _fbb.CreateVector< +- flatbuffers::Offset>( +- *dst_tensors) +- : 0; +- return tflite::gpu::data::CreateOperationDef(_fbb, precision, src_tensors__, +- dst_tensors__); ++ tflite::gpu::data::CalculationsPrecision precision = tflite::gpu::data::CalculationsPrecision::F32, ++ const std::vector> *src_tensors = nullptr, ++ const std::vector> *dst_tensors = nullptr) { ++ auto src_tensors__ = src_tensors ? _fbb.CreateVector>(*src_tensors) : 0; ++ auto dst_tensors__ = dst_tensors ? _fbb.CreateVector>(*dst_tensors) : 0; ++ return tflite::gpu::data::CreateOperationDef( ++ _fbb, ++ precision, ++ src_tensors__, ++ dst_tensors__); + } + + struct CompilerOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -2096,12 +2091,12 @@ struct CompilerOption FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + VT_OPTION = 4 + }; + tflite::gpu::data::CompilerOptions option() const { +- return static_cast( +- GetField(VT_OPTION, 0)); ++ return static_cast(GetField(VT_OPTION, 0)); + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_OPTION) && verifier.EndTable(); ++ VerifyField(verifier, VT_OPTION, 1) && ++ verifier.EndTable(); + } + }; + +@@ -2110,11 +2105,10 @@ struct CompilerOptionBuilder { + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_option(tflite::gpu::data::CompilerOptions option) { +- fbb_.AddElement(CompilerOption::VT_OPTION, +- static_cast(option), 0); ++ fbb_.AddElement(CompilerOption::VT_OPTION, static_cast(option), 0); + } + explicit CompilerOptionBuilder(flatbuffers::FlatBufferBuilder &_fbb) +- : fbb_(_fbb) { ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -2126,8 +2120,7 @@ struct CompilerOptionBuilder { + + inline flatbuffers::Offset CreateCompilerOption( + flatbuffers::FlatBufferBuilder &_fbb, +- tflite::gpu::data::CompilerOptions option = +- tflite::gpu::data::CompilerOptions::ADRENO_FULL_SIMD_LINE) { ++ tflite::gpu::data::CompilerOptions option = tflite::gpu::data::CompilerOptions::ADRENO_FULL_SIMD_LINE) { + CompilerOptionBuilder builder_(_fbb); + builder_.add_option(option); + return builder_.Finish(); +@@ -2164,23 +2157,24 @@ struct GPUOperation FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + const tflite::gpu::data::Int3 *work_group_size() const { + return GetPointer(VT_WORK_GROUP_SIZE); + } +- const flatbuffers::Vector< +- flatbuffers::Offset> +- *compiler_options() const { +- return GetPointer> *>( +- VT_COMPILER_OPTIONS); ++ const flatbuffers::Vector> *compiler_options() const { ++ return GetPointer> *>(VT_COMPILER_OPTIONS); + } + tflite::gpu::data::TensorToGrid tensor_to_grid() const { +- return static_cast( +- GetField(VT_TENSOR_TO_GRID, 0)); ++ return static_cast(GetField(VT_TENSOR_TO_GRID, 0)); ++ } ++ bool elementwise() const { ++ return GetField(VT_ELEMENTWISE, 0) != 0; ++ } ++ bool linkable() const { ++ return GetField(VT_LINKABLE, 0) != 0; + } +- bool elementwise() const { return GetField(VT_ELEMENTWISE, 0) != 0; } +- bool linkable() const { return GetField(VT_LINKABLE, 0) != 0; } + bool check_src_channels_size() const { + return GetField(VT_CHECK_SRC_CHANNELS_SIZE, 0) != 0; + } +- uint64_t flops() const { return GetField(VT_FLOPS, 0); } ++ uint64_t flops() const { ++ return GetField(VT_FLOPS, 0); ++ } + const tflite::gpu::data::OperationDef *definition() const { + return GetPointer(VT_DEFINITION); + } +@@ -2188,23 +2182,16 @@ struct GPUOperation FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return GetField(VT_GRID_DIMENSION, 0); + } + const tflite::gpu::data::Int3 *work_group_launch_order() const { +- return GetPointer( +- VT_WORK_GROUP_LAUNCH_ORDER); ++ return GetPointer(VT_WORK_GROUP_LAUNCH_ORDER); + } + const tflite::gpu::data::Int3 *grid_size() const { + return GetPointer(VT_GRID_SIZE); + } +- const flatbuffers::Vector> +- *src_tensors_names() const { +- return GetPointer< +- const flatbuffers::Vector> *>( +- VT_SRC_TENSORS_NAMES); ++ const flatbuffers::Vector> *src_tensors_names() const { ++ return GetPointer> *>(VT_SRC_TENSORS_NAMES); + } +- const flatbuffers::Vector> +- *dst_tensors_names() const { +- return GetPointer< +- const flatbuffers::Vector> *>( +- VT_DST_TENSORS_NAMES); ++ const flatbuffers::Vector> *dst_tensors_names() const { ++ return GetPointer> *>(VT_DST_TENSORS_NAMES); + } + const tflite::gpu::data::Int3 *work_groups_count() const { + return GetPointer(VT_WORK_GROUPS_COUNT); +@@ -2216,22 +2203,24 @@ struct GPUOperation FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return GetPointer(VT_ELEMENTWISE_CODE); + } + bool Verify(flatbuffers::Verifier &verifier) const { +- return VerifyTableStart(verifier) && VerifyOffset(verifier, VT_ARGUMENTS) && ++ return VerifyTableStart(verifier) && ++ VerifyOffset(verifier, VT_ARGUMENTS) && + verifier.VerifyTable(arguments()) && +- VerifyOffset(verifier, VT_CODE) && verifier.VerifyString(code()) && ++ VerifyOffset(verifier, VT_CODE) && ++ verifier.VerifyString(code()) && + VerifyOffset(verifier, VT_WORK_GROUP_SIZE) && + verifier.VerifyTable(work_group_size()) && + VerifyOffset(verifier, VT_COMPILER_OPTIONS) && + verifier.VerifyVector(compiler_options()) && + verifier.VerifyVectorOfTables(compiler_options()) && +- VerifyField(verifier, VT_TENSOR_TO_GRID) && +- VerifyField(verifier, VT_ELEMENTWISE) && +- VerifyField(verifier, VT_LINKABLE) && +- VerifyField(verifier, VT_CHECK_SRC_CHANNELS_SIZE) && +- VerifyField(verifier, VT_FLOPS) && ++ VerifyField(verifier, VT_TENSOR_TO_GRID, 1) && ++ VerifyField(verifier, VT_ELEMENTWISE, 1) && ++ VerifyField(verifier, VT_LINKABLE, 1) && ++ VerifyField(verifier, VT_CHECK_SRC_CHANNELS_SIZE, 1) && ++ VerifyField(verifier, VT_FLOPS, 8) && + VerifyOffset(verifier, VT_DEFINITION) && + verifier.VerifyTable(definition()) && +- VerifyField(verifier, VT_GRID_DIMENSION) && ++ VerifyField(verifier, VT_GRID_DIMENSION, 4) && + VerifyOffset(verifier, VT_WORK_GROUP_LAUNCH_ORDER) && + verifier.VerifyTable(work_group_launch_order()) && + VerifyOffset(verifier, VT_GRID_SIZE) && +@@ -2244,9 +2233,10 @@ struct GPUOperation FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + verifier.VerifyVectorOfStrings(dst_tensors_names()) && + VerifyOffset(verifier, VT_WORK_GROUPS_COUNT) && + verifier.VerifyTable(work_groups_count()) && +- VerifyField(verifier, VT_LINKABLE_COUNT) && ++ VerifyField(verifier, VT_LINKABLE_COUNT, 4) && + VerifyOffset(verifier, VT_ELEMENTWISE_CODE) && +- verifier.VerifyString(elementwise_code()) && verifier.EndTable(); ++ verifier.VerifyString(elementwise_code()) && ++ verifier.EndTable(); + } + }; + +@@ -2254,84 +2244,62 @@ struct GPUOperationBuilder { + typedef GPUOperation Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; +- void add_arguments( +- flatbuffers::Offset arguments) { ++ void add_arguments(flatbuffers::Offset arguments) { + fbb_.AddOffset(GPUOperation::VT_ARGUMENTS, arguments); + } + void add_code(flatbuffers::Offset code) { + fbb_.AddOffset(GPUOperation::VT_CODE, code); + } +- void add_work_group_size( +- flatbuffers::Offset work_group_size) { ++ void add_work_group_size(flatbuffers::Offset work_group_size) { + fbb_.AddOffset(GPUOperation::VT_WORK_GROUP_SIZE, work_group_size); + } +- void add_compiler_options( +- flatbuffers::Offset>> +- compiler_options) { ++ void add_compiler_options(flatbuffers::Offset>> compiler_options) { + fbb_.AddOffset(GPUOperation::VT_COMPILER_OPTIONS, compiler_options); + } + void add_tensor_to_grid(tflite::gpu::data::TensorToGrid tensor_to_grid) { +- fbb_.AddElement(GPUOperation::VT_TENSOR_TO_GRID, +- static_cast(tensor_to_grid), 0); ++ fbb_.AddElement(GPUOperation::VT_TENSOR_TO_GRID, static_cast(tensor_to_grid), 0); + } + void add_elementwise(bool elementwise) { +- fbb_.AddElement(GPUOperation::VT_ELEMENTWISE, +- static_cast(elementwise), 0); ++ fbb_.AddElement(GPUOperation::VT_ELEMENTWISE, static_cast(elementwise), 0); + } + void add_linkable(bool linkable) { +- fbb_.AddElement(GPUOperation::VT_LINKABLE, +- static_cast(linkable), 0); ++ fbb_.AddElement(GPUOperation::VT_LINKABLE, static_cast(linkable), 0); + } + void add_check_src_channels_size(bool check_src_channels_size) { +- fbb_.AddElement(GPUOperation::VT_CHECK_SRC_CHANNELS_SIZE, +- static_cast(check_src_channels_size), 0); ++ fbb_.AddElement(GPUOperation::VT_CHECK_SRC_CHANNELS_SIZE, static_cast(check_src_channels_size), 0); + } + void add_flops(uint64_t flops) { + fbb_.AddElement(GPUOperation::VT_FLOPS, flops, 0); + } +- void add_definition( +- flatbuffers::Offset definition) { ++ void add_definition(flatbuffers::Offset definition) { + fbb_.AddOffset(GPUOperation::VT_DEFINITION, definition); + } + void add_grid_dimension(int32_t grid_dimension) { +- fbb_.AddElement(GPUOperation::VT_GRID_DIMENSION, grid_dimension, +- 0); ++ fbb_.AddElement(GPUOperation::VT_GRID_DIMENSION, grid_dimension, 0); + } +- void add_work_group_launch_order( +- flatbuffers::Offset work_group_launch_order) { +- fbb_.AddOffset(GPUOperation::VT_WORK_GROUP_LAUNCH_ORDER, +- work_group_launch_order); ++ void add_work_group_launch_order(flatbuffers::Offset work_group_launch_order) { ++ fbb_.AddOffset(GPUOperation::VT_WORK_GROUP_LAUNCH_ORDER, work_group_launch_order); + } + void add_grid_size(flatbuffers::Offset grid_size) { + fbb_.AddOffset(GPUOperation::VT_GRID_SIZE, grid_size); + } +- void add_src_tensors_names( +- flatbuffers::Offset< +- flatbuffers::Vector>> +- src_tensors_names) { ++ void add_src_tensors_names(flatbuffers::Offset>> src_tensors_names) { + fbb_.AddOffset(GPUOperation::VT_SRC_TENSORS_NAMES, src_tensors_names); + } +- void add_dst_tensors_names( +- flatbuffers::Offset< +- flatbuffers::Vector>> +- dst_tensors_names) { ++ void add_dst_tensors_names(flatbuffers::Offset>> dst_tensors_names) { + fbb_.AddOffset(GPUOperation::VT_DST_TENSORS_NAMES, dst_tensors_names); + } +- void add_work_groups_count( +- flatbuffers::Offset work_groups_count) { ++ void add_work_groups_count(flatbuffers::Offset work_groups_count) { + fbb_.AddOffset(GPUOperation::VT_WORK_GROUPS_COUNT, work_groups_count); + } + void add_linkable_count(int32_t linkable_count) { +- fbb_.AddElement(GPUOperation::VT_LINKABLE_COUNT, linkable_count, +- 0); ++ fbb_.AddElement(GPUOperation::VT_LINKABLE_COUNT, linkable_count, 0); + } +- void add_elementwise_code( +- flatbuffers::Offset elementwise_code) { ++ void add_elementwise_code(flatbuffers::Offset elementwise_code) { + fbb_.AddOffset(GPUOperation::VT_ELEMENTWISE_CODE, elementwise_code); + } + explicit GPUOperationBuilder(flatbuffers::FlatBufferBuilder &_fbb) +- : fbb_(_fbb) { ++ : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } + flatbuffers::Offset Finish() { +@@ -2346,23 +2314,18 @@ inline flatbuffers::Offset CreateGPUOperation( + flatbuffers::Offset arguments = 0, + flatbuffers::Offset code = 0, + flatbuffers::Offset work_group_size = 0, +- flatbuffers::Offset>> +- compiler_options = 0, +- tflite::gpu::data::TensorToGrid tensor_to_grid = +- tflite::gpu::data::TensorToGrid::CUSTOM, +- bool elementwise = false, bool linkable = false, +- bool check_src_channels_size = false, uint64_t flops = 0, ++ flatbuffers::Offset>> compiler_options = 0, ++ tflite::gpu::data::TensorToGrid tensor_to_grid = tflite::gpu::data::TensorToGrid::CUSTOM, ++ bool elementwise = false, ++ bool linkable = false, ++ bool check_src_channels_size = false, ++ uint64_t flops = 0, + flatbuffers::Offset definition = 0, + int32_t grid_dimension = 0, + flatbuffers::Offset work_group_launch_order = 0, + flatbuffers::Offset grid_size = 0, +- flatbuffers::Offset< +- flatbuffers::Vector>> +- src_tensors_names = 0, +- flatbuffers::Offset< +- flatbuffers::Vector>> +- dst_tensors_names = 0, ++ flatbuffers::Offset>> src_tensors_names = 0, ++ flatbuffers::Offset>> dst_tensors_names = 0, + flatbuffers::Offset work_groups_count = 0, + int32_t linkable_count = 0, + flatbuffers::Offset elementwise_code = 0) { +@@ -2393,47 +2356,46 @@ inline flatbuffers::Offset CreateGPUOperationDirect( + flatbuffers::Offset arguments = 0, + const char *code = nullptr, + flatbuffers::Offset work_group_size = 0, +- const std::vector> +- *compiler_options = nullptr, +- tflite::gpu::data::TensorToGrid tensor_to_grid = +- tflite::gpu::data::TensorToGrid::CUSTOM, +- bool elementwise = false, bool linkable = false, +- bool check_src_channels_size = false, uint64_t flops = 0, ++ const std::vector> *compiler_options = nullptr, ++ tflite::gpu::data::TensorToGrid tensor_to_grid = tflite::gpu::data::TensorToGrid::CUSTOM, ++ bool elementwise = false, ++ bool linkable = false, ++ bool check_src_channels_size = false, ++ uint64_t flops = 0, + flatbuffers::Offset definition = 0, + int32_t grid_dimension = 0, + flatbuffers::Offset work_group_launch_order = 0, + flatbuffers::Offset grid_size = 0, +- const std::vector> +- *src_tensors_names = nullptr, +- const std::vector> +- *dst_tensors_names = nullptr, ++ const std::vector> *src_tensors_names = nullptr, ++ const std::vector> *dst_tensors_names = nullptr, + flatbuffers::Offset work_groups_count = 0, +- int32_t linkable_count = 0, const char *elementwise_code = nullptr) { ++ int32_t linkable_count = 0, ++ const char *elementwise_code = nullptr) { + auto code__ = code ? _fbb.CreateString(code) : 0; +- auto compiler_options__ = +- compiler_options +- ? _fbb.CreateVector< +- flatbuffers::Offset>( +- *compiler_options) +- : 0; +- auto src_tensors_names__ = +- src_tensors_names +- ? _fbb.CreateVector>( +- *src_tensors_names) +- : 0; +- auto dst_tensors_names__ = +- dst_tensors_names +- ? _fbb.CreateVector>( +- *dst_tensors_names) +- : 0; +- auto elementwise_code__ = +- elementwise_code ? _fbb.CreateString(elementwise_code) : 0; ++ auto compiler_options__ = compiler_options ? _fbb.CreateVector>(*compiler_options) : 0; ++ auto src_tensors_names__ = src_tensors_names ? _fbb.CreateVector>(*src_tensors_names) : 0; ++ auto dst_tensors_names__ = dst_tensors_names ? _fbb.CreateVector>(*dst_tensors_names) : 0; ++ auto elementwise_code__ = elementwise_code ? _fbb.CreateString(elementwise_code) : 0; + return tflite::gpu::data::CreateGPUOperation( +- _fbb, arguments, code__, work_group_size, compiler_options__, +- tensor_to_grid, elementwise, linkable, check_src_channels_size, flops, +- definition, grid_dimension, work_group_launch_order, grid_size, +- src_tensors_names__, dst_tensors_names__, work_groups_count, +- linkable_count, elementwise_code__); ++ _fbb, ++ arguments, ++ code__, ++ work_group_size, ++ compiler_options__, ++ tensor_to_grid, ++ elementwise, ++ linkable, ++ check_src_channels_size, ++ flops, ++ definition, ++ grid_dimension, ++ work_group_launch_order, ++ grid_size, ++ src_tensors_names__, ++ dst_tensors_names__, ++ work_groups_count, ++ linkable_count, ++ elementwise_code__); + } + + } // namespace data +diff --git a/tensorflow/lite/experimental/acceleration/configuration/BUILD b/tensorflow/lite/experimental/acceleration/configuration/BUILD +index 4aa77261555..54fa181e5c2 100644 +--- a/tensorflow/lite/experimental/acceleration/configuration/BUILD ++++ b/tensorflow/lite/experimental/acceleration/configuration/BUILD +@@ -83,31 +83,11 @@ tf_proto_library_py( + ) + # copybara:comment_end + +-# TODO(b/191428000): The automatic generation is temporarily disabled until +-# https://github.com/google/flatbuffers/pull/6486 is landed and tensorflow +-# flatbuffer version updated. +-# Until that time you need to build configuration_for_generation_generated.h +-# and copy the result to configuration_generated.h. +-genrule( +- name = "copy_configuration_fbs", +- srcs = ["configuration.fbs"], +- outs = ["configuration_for_generation.fbs"], +- cmd = "cp $(<) $(@)", +-) +- + flatbuffer_cc_library( +- name = "configuration_fbs_for_generation", +- srcs = [":configuration_for_generation.fbs"], +- flatc_args = DEFAULT_FLATC_ARGS + ["--gen-compare"], +- visibility = ["//visibility:private"], +-) +- +-cc_library( + name = "configuration_fbs", +- hdrs = ["configuration_generated.h"], ++ srcs = [":configuration.fbs"], + compatible_with = get_compatible_with_portable(), +- linkstatic = True, +- deps = ["@flatbuffers//:runtime_cc"], ++ flatc_args = DEFAULT_FLATC_ARGS + ["--gen-compare"], + ) + + flatbuffer_java_library( +diff --git a/tensorflow/lite/experimental/acceleration/configuration/configuration_generated.h b/tensorflow/lite/experimental/acceleration/configuration/configuration_generated.h +old mode 100644 +new mode 100755 +index 40b0f0322bc..1491cb9ff83 +--- a/tensorflow/lite/experimental/acceleration/configuration/configuration_generated.h ++++ b/tensorflow/lite/experimental/acceleration/configuration/configuration_generated.h +@@ -12,86 +12,109 @@ WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. + See the License for the specific language governing permissions and + limitations under the License. + ==============================================================================*/ +-// clang-format off + // automatically generated by the FlatBuffers compiler, do not modify + +-#ifndef FLATBUFFERS_GENERATED_CONFIGURATIONFORGENERATION_TFLITE_H_ +-#define FLATBUFFERS_GENERATED_CONFIGURATIONFORGENERATION_TFLITE_H_ ++#ifndef FLATBUFFERS_GENERATED_CONFIGURATION_TFLITE_H_ ++#define FLATBUFFERS_GENERATED_CONFIGURATION_TFLITE_H_ + + #include "flatbuffers/flatbuffers.h" + + namespace tflite { + + struct ComputeSettings; ++struct ComputeSettingsBuilder; + struct ComputeSettingsT; + + struct NNAPISettings; ++struct NNAPISettingsBuilder; + struct NNAPISettingsT; + + struct GPUSettings; ++struct GPUSettingsBuilder; + struct GPUSettingsT; + + struct HexagonSettings; ++struct HexagonSettingsBuilder; + struct HexagonSettingsT; + + struct XNNPackSettings; ++struct XNNPackSettingsBuilder; + struct XNNPackSettingsT; + + struct CoreMLSettings; ++struct CoreMLSettingsBuilder; + struct CoreMLSettingsT; + + struct EdgeTpuDeviceSpec; ++struct EdgeTpuDeviceSpecBuilder; + struct EdgeTpuDeviceSpecT; + + struct EdgeTpuInactivePowerConfig; ++struct EdgeTpuInactivePowerConfigBuilder; + struct EdgeTpuInactivePowerConfigT; + + struct EdgeTpuSettings; ++struct EdgeTpuSettingsBuilder; + struct EdgeTpuSettingsT; + + struct CoralSettings; ++struct CoralSettingsBuilder; + struct CoralSettingsT; + + struct CPUSettings; ++struct CPUSettingsBuilder; + struct CPUSettingsT; + + struct TFLiteSettings; ++struct TFLiteSettingsBuilder; + struct TFLiteSettingsT; + + struct FallbackSettings; ++struct FallbackSettingsBuilder; + struct FallbackSettingsT; + + struct BenchmarkMetric; ++struct BenchmarkMetricBuilder; + struct BenchmarkMetricT; + + struct BenchmarkResult; ++struct BenchmarkResultBuilder; + struct BenchmarkResultT; + + struct ErrorCode; ++struct ErrorCodeBuilder; + struct ErrorCodeT; + + struct BenchmarkError; ++struct BenchmarkErrorBuilder; + struct BenchmarkErrorT; + + struct BenchmarkEvent; ++struct BenchmarkEventBuilder; + struct BenchmarkEventT; + + struct BestAccelerationDecision; ++struct BestAccelerationDecisionBuilder; + struct BestAccelerationDecisionT; + + struct BenchmarkInitializationFailure; ++struct BenchmarkInitializationFailureBuilder; + struct BenchmarkInitializationFailureT; + + struct MiniBenchmarkEvent; ++struct MiniBenchmarkEventBuilder; + struct MiniBenchmarkEventT; + + struct ModelFile; ++struct ModelFileBuilder; + struct ModelFileT; + + struct BenchmarkStoragePaths; ++struct BenchmarkStoragePathsBuilder; + struct BenchmarkStoragePathsT; + + struct MinibenchmarkSettings; ++struct MinibenchmarkSettingsBuilder; + struct MinibenchmarkSettingsT; + + bool operator==(const ComputeSettingsT &lhs, const ComputeSettingsT &rhs); +@@ -143,7 +166,7 @@ bool operator!=(const BenchmarkStoragePathsT &lhs, const BenchmarkStoragePathsT + bool operator==(const MinibenchmarkSettingsT &lhs, const MinibenchmarkSettingsT &rhs); + bool operator!=(const MinibenchmarkSettingsT &lhs, const MinibenchmarkSettingsT &rhs); + +-enum ExecutionPreference { ++enum ExecutionPreference : int32_t { + ExecutionPreference_ANY = 0, + ExecutionPreference_LOW_LATENCY = 1, + ExecutionPreference_LOW_POWER = 2, +@@ -179,7 +202,7 @@ inline const char *EnumNameExecutionPreference(ExecutionPreference e) { + return EnumNamesExecutionPreference()[index]; + } + +-enum Delegate { ++enum Delegate : int32_t { + Delegate_NONE = 0, + Delegate_NNAPI = 1, + Delegate_GPU = 2, +@@ -227,7 +250,7 @@ inline const char *EnumNameDelegate(Delegate e) { + return EnumNamesDelegate()[index]; + } + +-enum NNAPIExecutionPreference { ++enum NNAPIExecutionPreference : int32_t { + NNAPIExecutionPreference_UNDEFINED = 0, + NNAPIExecutionPreference_NNAPI_LOW_POWER = 1, + NNAPIExecutionPreference_NNAPI_FAST_SINGLE_ANSWER = 2, +@@ -263,7 +286,7 @@ inline const char *EnumNameNNAPIExecutionPreference(NNAPIExecutionPreference e) + return EnumNamesNNAPIExecutionPreference()[index]; + } + +-enum NNAPIExecutionPriority { ++enum NNAPIExecutionPriority : int32_t { + NNAPIExecutionPriority_NNAPI_PRIORITY_UNDEFINED = 0, + NNAPIExecutionPriority_NNAPI_PRIORITY_LOW = 1, + NNAPIExecutionPriority_NNAPI_PRIORITY_MEDIUM = 2, +@@ -299,7 +322,7 @@ inline const char *EnumNameNNAPIExecutionPriority(NNAPIExecutionPriority e) { + return EnumNamesNNAPIExecutionPriority()[index]; + } + +-enum GPUBackend { ++enum GPUBackend : int32_t { + GPUBackend_UNSET = 0, + GPUBackend_OPENCL = 1, + GPUBackend_OPENGL = 2, +@@ -332,7 +355,7 @@ inline const char *EnumNameGPUBackend(GPUBackend e) { + return EnumNamesGPUBackend()[index]; + } + +-enum GPUInferencePriority { ++enum GPUInferencePriority : int32_t { + GPUInferencePriority_GPU_PRIORITY_AUTO = 0, + GPUInferencePriority_GPU_PRIORITY_MAX_PRECISION = 1, + GPUInferencePriority_GPU_PRIORITY_MIN_LATENCY = 2, +@@ -368,7 +391,7 @@ inline const char *EnumNameGPUInferencePriority(GPUInferencePriority e) { + return EnumNamesGPUInferencePriority()[index]; + } + +-enum GPUInferenceUsage { ++enum GPUInferenceUsage : int32_t { + GPUInferenceUsage_GPU_INFERENCE_PREFERENCE_FAST_SINGLE_ANSWER = 0, + GPUInferenceUsage_GPU_INFERENCE_PREFERENCE_SUSTAINED_SPEED = 1, + GPUInferenceUsage_MIN = GPUInferenceUsage_GPU_INFERENCE_PREFERENCE_FAST_SINGLE_ANSWER, +@@ -400,7 +423,7 @@ inline const char *EnumNameGPUInferenceUsage(GPUInferenceUsage e) { + + namespace CoreMLSettings_ { + +-enum EnabledDevices { ++enum EnabledDevices : int32_t { + EnabledDevices_DEVICES_ALL = 0, + EnabledDevices_DEVICES_WITH_NEURAL_ENGINE = 1, + EnabledDevices_MIN = EnabledDevices_DEVICES_ALL, +@@ -434,7 +457,7 @@ inline const char *EnumNameEnabledDevices(EnabledDevices e) { + + namespace EdgeTpuDeviceSpec_ { + +-enum PlatformType { ++enum PlatformType : int32_t { + PlatformType_MMIO = 0, + PlatformType_REFERENCE = 1, + PlatformType_SIMULATOR = 2, +@@ -472,7 +495,7 @@ inline const char *EnumNamePlatformType(PlatformType e) { + + } // namespace EdgeTpuDeviceSpec_ + +-enum EdgeTpuPowerState { ++enum EdgeTpuPowerState : int32_t { + EdgeTpuPowerState_UNDEFINED_POWERSTATE = 0, + EdgeTpuPowerState_TPU_CORE_OFF = 1, + EdgeTpuPowerState_READY = 2, +@@ -522,7 +545,7 @@ inline const char *EnumNameEdgeTpuPowerState(EdgeTpuPowerState e) { + + namespace EdgeTpuSettings_ { + +-enum FloatTruncationType { ++enum FloatTruncationType : int32_t { + FloatTruncationType_UNSPECIFIED = 0, + FloatTruncationType_NO_TRUNCATION = 1, + FloatTruncationType_BFLOAT16 = 2, +@@ -558,7 +581,7 @@ inline const char *EnumNameFloatTruncationType(FloatTruncationType e) { + return EnumNamesFloatTruncationType()[index]; + } + +-enum QosClass { ++enum QosClass : int32_t { + QosClass_QOS_UNDEFINED = 0, + QosClass_BEST_EFFORT = 1, + QosClass_REALTIME = 2, +@@ -595,7 +618,7 @@ inline const char *EnumNameQosClass(QosClass e) { + + namespace CoralSettings_ { + +-enum Performance { ++enum Performance : int32_t { + Performance_UNDEFINED = 0, + Performance_MAXIMUM = 1, + Performance_HIGH = 2, +@@ -636,7 +659,7 @@ inline const char *EnumNamePerformance(Performance e) { + + } // namespace CoralSettings_ + +-enum BenchmarkEventType { ++enum BenchmarkEventType : int32_t { + BenchmarkEventType_UNDEFINED_BENCHMARK_EVENT_TYPE = 0, + BenchmarkEventType_START = 1, + BenchmarkEventType_END = 2, +@@ -678,7 +701,7 @@ inline const char *EnumNameBenchmarkEventType(BenchmarkEventType e) { + return EnumNamesBenchmarkEventType()[index]; + } + +-enum BenchmarkStage { ++enum BenchmarkStage : int32_t { + BenchmarkStage_UNKNOWN = 0, + BenchmarkStage_INITIALIZATION = 1, + BenchmarkStage_INFERENCE = 2, +@@ -713,18 +736,20 @@ inline const char *EnumNameBenchmarkStage(BenchmarkStage e) { + + struct ComputeSettingsT : public flatbuffers::NativeTable { + typedef ComputeSettings TableType; +- tflite::ExecutionPreference preference; +- std::unique_ptr tflite_settings; +- std::string model_namespace_for_statistics; +- std::string model_identifier_for_statistics; +- std::unique_ptr settings_to_test_locally; +- ComputeSettingsT() +- : preference(tflite::ExecutionPreference_ANY) { +- } ++ tflite::ExecutionPreference preference = tflite::ExecutionPreference_ANY; ++ std::unique_ptr tflite_settings{}; ++ std::string model_namespace_for_statistics{}; ++ std::string model_identifier_for_statistics{}; ++ std::unique_ptr settings_to_test_locally{}; ++ ComputeSettingsT() = default; ++ ComputeSettingsT(const ComputeSettingsT &o); ++ ComputeSettingsT(ComputeSettingsT&&) FLATBUFFERS_NOEXCEPT = default; ++ ComputeSettingsT &operator=(ComputeSettingsT o) FLATBUFFERS_NOEXCEPT; + }; + + struct ComputeSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ComputeSettingsT NativeTableType; ++ typedef ComputeSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PREFERENCE = 4, + VT_TFLITE_SETTINGS = 6, +@@ -749,7 +774,7 @@ struct ComputeSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PREFERENCE) && ++ VerifyField(verifier, VT_PREFERENCE, 4) && + VerifyOffset(verifier, VT_TFLITE_SETTINGS) && + verifier.VerifyTable(tflite_settings()) && + VerifyOffset(verifier, VT_MODEL_NAMESPACE_FOR_STATISTICS) && +@@ -766,6 +791,7 @@ struct ComputeSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ComputeSettingsBuilder { ++ typedef ComputeSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_preference(tflite::ExecutionPreference preference) { +@@ -787,7 +813,6 @@ struct ComputeSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ComputeSettingsBuilder &operator=(const ComputeSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -833,32 +858,27 @@ flatbuffers::Offset CreateComputeSettings(flatbuffers::FlatBuff + + struct NNAPISettingsT : public flatbuffers::NativeTable { + typedef NNAPISettings TableType; +- std::string accelerator_name; +- std::string cache_directory; +- std::string model_token; +- tflite::NNAPIExecutionPreference execution_preference; +- int32_t no_of_nnapi_instances_to_cache; +- std::unique_ptr fallback_settings; +- bool allow_nnapi_cpu_on_android_10_plus; +- tflite::NNAPIExecutionPriority execution_priority; +- bool allow_dynamic_dimensions; +- bool allow_fp16_precision_for_fp32; +- bool use_burst_computation; +- int64_t support_library_handle; +- NNAPISettingsT() +- : execution_preference(tflite::NNAPIExecutionPreference_UNDEFINED), +- no_of_nnapi_instances_to_cache(0), +- allow_nnapi_cpu_on_android_10_plus(false), +- execution_priority(tflite::NNAPIExecutionPriority_NNAPI_PRIORITY_UNDEFINED), +- allow_dynamic_dimensions(false), +- allow_fp16_precision_for_fp32(false), +- use_burst_computation(false), +- support_library_handle(0) { +- } ++ std::string accelerator_name{}; ++ std::string cache_directory{}; ++ std::string model_token{}; ++ tflite::NNAPIExecutionPreference execution_preference = tflite::NNAPIExecutionPreference_UNDEFINED; ++ int32_t no_of_nnapi_instances_to_cache = 0; ++ std::unique_ptr fallback_settings{}; ++ bool allow_nnapi_cpu_on_android_10_plus = false; ++ tflite::NNAPIExecutionPriority execution_priority = tflite::NNAPIExecutionPriority_NNAPI_PRIORITY_UNDEFINED; ++ bool allow_dynamic_dimensions = false; ++ bool allow_fp16_precision_for_fp32 = false; ++ bool use_burst_computation = false; ++ int64_t support_library_handle = 0; ++ NNAPISettingsT() = default; ++ NNAPISettingsT(const NNAPISettingsT &o); ++ NNAPISettingsT(NNAPISettingsT&&) FLATBUFFERS_NOEXCEPT = default; ++ NNAPISettingsT &operator=(NNAPISettingsT o) FLATBUFFERS_NOEXCEPT; + }; + + struct NNAPISettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NNAPISettingsT NativeTableType; ++ typedef NNAPISettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ACCELERATOR_NAME = 4, + VT_CACHE_DIRECTORY = 6, +@@ -917,16 +937,16 @@ struct NNAPISettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + verifier.VerifyString(cache_directory()) && + VerifyOffset(verifier, VT_MODEL_TOKEN) && + verifier.VerifyString(model_token()) && +- VerifyField(verifier, VT_EXECUTION_PREFERENCE) && +- VerifyField(verifier, VT_NO_OF_NNAPI_INSTANCES_TO_CACHE) && ++ VerifyField(verifier, VT_EXECUTION_PREFERENCE, 4) && ++ VerifyField(verifier, VT_NO_OF_NNAPI_INSTANCES_TO_CACHE, 4) && + VerifyOffset(verifier, VT_FALLBACK_SETTINGS) && + verifier.VerifyTable(fallback_settings()) && +- VerifyField(verifier, VT_ALLOW_NNAPI_CPU_ON_ANDROID_10_PLUS) && +- VerifyField(verifier, VT_EXECUTION_PRIORITY) && +- VerifyField(verifier, VT_ALLOW_DYNAMIC_DIMENSIONS) && +- VerifyField(verifier, VT_ALLOW_FP16_PRECISION_FOR_FP32) && +- VerifyField(verifier, VT_USE_BURST_COMPUTATION) && +- VerifyField(verifier, VT_SUPPORT_LIBRARY_HANDLE) && ++ VerifyField(verifier, VT_ALLOW_NNAPI_CPU_ON_ANDROID_10_PLUS, 1) && ++ VerifyField(verifier, VT_EXECUTION_PRIORITY, 4) && ++ VerifyField(verifier, VT_ALLOW_DYNAMIC_DIMENSIONS, 1) && ++ VerifyField(verifier, VT_ALLOW_FP16_PRECISION_FOR_FP32, 1) && ++ VerifyField(verifier, VT_USE_BURST_COMPUTATION, 1) && ++ VerifyField(verifier, VT_SUPPORT_LIBRARY_HANDLE, 8) && + verifier.EndTable(); + } + NNAPISettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -935,6 +955,7 @@ struct NNAPISettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct NNAPISettingsBuilder { ++ typedef NNAPISettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_accelerator_name(flatbuffers::Offset accelerator_name) { +@@ -977,7 +998,6 @@ struct NNAPISettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NNAPISettingsBuilder &operator=(const NNAPISettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1052,28 +1072,20 @@ flatbuffers::Offset CreateNNAPISettings(flatbuffers::FlatBufferBu + + struct GPUSettingsT : public flatbuffers::NativeTable { + typedef GPUSettings TableType; +- bool is_precision_loss_allowed; +- bool enable_quantized_inference; +- tflite::GPUBackend force_backend; +- tflite::GPUInferencePriority inference_priority1; +- tflite::GPUInferencePriority inference_priority2; +- tflite::GPUInferencePriority inference_priority3; +- tflite::GPUInferenceUsage inference_preference; +- std::string cache_directory; +- std::string model_token; +- GPUSettingsT() +- : is_precision_loss_allowed(false), +- enable_quantized_inference(true), +- force_backend(tflite::GPUBackend_UNSET), +- inference_priority1(tflite::GPUInferencePriority_GPU_PRIORITY_AUTO), +- inference_priority2(tflite::GPUInferencePriority_GPU_PRIORITY_AUTO), +- inference_priority3(tflite::GPUInferencePriority_GPU_PRIORITY_AUTO), +- inference_preference(tflite::GPUInferenceUsage_GPU_INFERENCE_PREFERENCE_FAST_SINGLE_ANSWER) { +- } ++ bool is_precision_loss_allowed = false; ++ bool enable_quantized_inference = true; ++ tflite::GPUBackend force_backend = tflite::GPUBackend_UNSET; ++ tflite::GPUInferencePriority inference_priority1 = tflite::GPUInferencePriority_GPU_PRIORITY_AUTO; ++ tflite::GPUInferencePriority inference_priority2 = tflite::GPUInferencePriority_GPU_PRIORITY_AUTO; ++ tflite::GPUInferencePriority inference_priority3 = tflite::GPUInferencePriority_GPU_PRIORITY_AUTO; ++ tflite::GPUInferenceUsage inference_preference = tflite::GPUInferenceUsage_GPU_INFERENCE_PREFERENCE_FAST_SINGLE_ANSWER; ++ std::string cache_directory{}; ++ std::string model_token{}; + }; + + struct GPUSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GPUSettingsT NativeTableType; ++ typedef GPUSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IS_PRECISION_LOSS_ALLOWED = 4, + VT_ENABLE_QUANTIZED_INFERENCE = 6, +@@ -1114,13 +1126,13 @@ struct GPUSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_IS_PRECISION_LOSS_ALLOWED) && +- VerifyField(verifier, VT_ENABLE_QUANTIZED_INFERENCE) && +- VerifyField(verifier, VT_FORCE_BACKEND) && +- VerifyField(verifier, VT_INFERENCE_PRIORITY1) && +- VerifyField(verifier, VT_INFERENCE_PRIORITY2) && +- VerifyField(verifier, VT_INFERENCE_PRIORITY3) && +- VerifyField(verifier, VT_INFERENCE_PREFERENCE) && ++ VerifyField(verifier, VT_IS_PRECISION_LOSS_ALLOWED, 1) && ++ VerifyField(verifier, VT_ENABLE_QUANTIZED_INFERENCE, 1) && ++ VerifyField(verifier, VT_FORCE_BACKEND, 4) && ++ VerifyField(verifier, VT_INFERENCE_PRIORITY1, 4) && ++ VerifyField(verifier, VT_INFERENCE_PRIORITY2, 4) && ++ VerifyField(verifier, VT_INFERENCE_PRIORITY3, 4) && ++ VerifyField(verifier, VT_INFERENCE_PREFERENCE, 4) && + VerifyOffset(verifier, VT_CACHE_DIRECTORY) && + verifier.VerifyString(cache_directory()) && + VerifyOffset(verifier, VT_MODEL_TOKEN) && +@@ -1133,6 +1145,7 @@ struct GPUSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GPUSettingsBuilder { ++ typedef GPUSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_is_precision_loss_allowed(bool is_precision_loss_allowed) { +@@ -1166,7 +1179,6 @@ struct GPUSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GPUSettingsBuilder &operator=(const GPUSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1228,20 +1240,15 @@ flatbuffers::Offset CreateGPUSettings(flatbuffers::FlatBufferBuilde + + struct HexagonSettingsT : public flatbuffers::NativeTable { + typedef HexagonSettings TableType; +- int32_t debug_level; +- int32_t powersave_level; +- bool print_graph_profile; +- bool print_graph_debug; +- HexagonSettingsT() +- : debug_level(0), +- powersave_level(0), +- print_graph_profile(false), +- print_graph_debug(false) { +- } ++ int32_t debug_level = 0; ++ int32_t powersave_level = 0; ++ bool print_graph_profile = false; ++ bool print_graph_debug = false; + }; + + struct HexagonSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HexagonSettingsT NativeTableType; ++ typedef HexagonSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEBUG_LEVEL = 4, + VT_POWERSAVE_LEVEL = 6, +@@ -1262,10 +1269,10 @@ struct HexagonSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_DEBUG_LEVEL) && +- VerifyField(verifier, VT_POWERSAVE_LEVEL) && +- VerifyField(verifier, VT_PRINT_GRAPH_PROFILE) && +- VerifyField(verifier, VT_PRINT_GRAPH_DEBUG) && ++ VerifyField(verifier, VT_DEBUG_LEVEL, 4) && ++ VerifyField(verifier, VT_POWERSAVE_LEVEL, 4) && ++ VerifyField(verifier, VT_PRINT_GRAPH_PROFILE, 1) && ++ VerifyField(verifier, VT_PRINT_GRAPH_DEBUG, 1) && + verifier.EndTable(); + } + HexagonSettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1274,6 +1281,7 @@ struct HexagonSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct HexagonSettingsBuilder { ++ typedef HexagonSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_debug_level(int32_t debug_level) { +@@ -1292,7 +1300,6 @@ struct HexagonSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- HexagonSettingsBuilder &operator=(const HexagonSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1318,14 +1325,12 @@ flatbuffers::Offset CreateHexagonSettings(flatbuffers::FlatBuff + + struct XNNPackSettingsT : public flatbuffers::NativeTable { + typedef XNNPackSettings TableType; +- int32_t num_threads; +- XNNPackSettingsT() +- : num_threads(0) { +- } ++ int32_t num_threads = 0; + }; + + struct XNNPackSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef XNNPackSettingsT NativeTableType; ++ typedef XNNPackSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_THREADS = 4 + }; +@@ -1334,7 +1339,7 @@ struct XNNPackSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NUM_THREADS) && ++ VerifyField(verifier, VT_NUM_THREADS, 4) && + verifier.EndTable(); + } + XNNPackSettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1343,6 +1348,7 @@ struct XNNPackSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct XNNPackSettingsBuilder { ++ typedef XNNPackSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_num_threads(int32_t num_threads) { +@@ -1352,7 +1358,6 @@ struct XNNPackSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- XNNPackSettingsBuilder &operator=(const XNNPackSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1372,20 +1377,15 @@ flatbuffers::Offset CreateXNNPackSettings(flatbuffers::FlatBuff + + struct CoreMLSettingsT : public flatbuffers::NativeTable { + typedef CoreMLSettings TableType; +- tflite::CoreMLSettings_::EnabledDevices enabled_devices; +- int32_t coreml_version; +- int32_t max_delegated_partitions; +- int32_t min_nodes_per_partition; +- CoreMLSettingsT() +- : enabled_devices(tflite::CoreMLSettings_::EnabledDevices_DEVICES_ALL), +- coreml_version(0), +- max_delegated_partitions(0), +- min_nodes_per_partition(2) { +- } ++ tflite::CoreMLSettings_::EnabledDevices enabled_devices = tflite::CoreMLSettings_::EnabledDevices_DEVICES_ALL; ++ int32_t coreml_version = 0; ++ int32_t max_delegated_partitions = 0; ++ int32_t min_nodes_per_partition = 2; + }; + + struct CoreMLSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CoreMLSettingsT NativeTableType; ++ typedef CoreMLSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ENABLED_DEVICES = 4, + VT_COREML_VERSION = 6, +@@ -1406,10 +1406,10 @@ struct CoreMLSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_ENABLED_DEVICES) && +- VerifyField(verifier, VT_COREML_VERSION) && +- VerifyField(verifier, VT_MAX_DELEGATED_PARTITIONS) && +- VerifyField(verifier, VT_MIN_NODES_PER_PARTITION) && ++ VerifyField(verifier, VT_ENABLED_DEVICES, 4) && ++ VerifyField(verifier, VT_COREML_VERSION, 4) && ++ VerifyField(verifier, VT_MAX_DELEGATED_PARTITIONS, 4) && ++ VerifyField(verifier, VT_MIN_NODES_PER_PARTITION, 4) && + verifier.EndTable(); + } + CoreMLSettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1418,6 +1418,7 @@ struct CoreMLSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CoreMLSettingsBuilder { ++ typedef CoreMLSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_enabled_devices(tflite::CoreMLSettings_::EnabledDevices enabled_devices) { +@@ -1436,7 +1437,6 @@ struct CoreMLSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CoreMLSettingsBuilder &operator=(const CoreMLSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1462,19 +1462,15 @@ flatbuffers::Offset CreateCoreMLSettings(flatbuffers::FlatBuffer + + struct EdgeTpuDeviceSpecT : public flatbuffers::NativeTable { + typedef EdgeTpuDeviceSpec TableType; +- tflite::EdgeTpuDeviceSpec_::PlatformType platform_type; +- int32_t num_chips; +- std::vector device_paths; +- int32_t chip_family; +- EdgeTpuDeviceSpecT() +- : platform_type(tflite::EdgeTpuDeviceSpec_::PlatformType_MMIO), +- num_chips(0), +- chip_family(0) { +- } ++ tflite::EdgeTpuDeviceSpec_::PlatformType platform_type = tflite::EdgeTpuDeviceSpec_::PlatformType_MMIO; ++ int32_t num_chips = 0; ++ std::vector device_paths{}; ++ int32_t chip_family = 0; + }; + + struct EdgeTpuDeviceSpec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EdgeTpuDeviceSpecT NativeTableType; ++ typedef EdgeTpuDeviceSpecBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PLATFORM_TYPE = 4, + VT_NUM_CHIPS = 6, +@@ -1495,12 +1491,12 @@ struct EdgeTpuDeviceSpec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PLATFORM_TYPE) && +- VerifyField(verifier, VT_NUM_CHIPS) && ++ VerifyField(verifier, VT_PLATFORM_TYPE, 4) && ++ VerifyField(verifier, VT_NUM_CHIPS, 4) && + VerifyOffset(verifier, VT_DEVICE_PATHS) && + verifier.VerifyVector(device_paths()) && + verifier.VerifyVectorOfStrings(device_paths()) && +- VerifyField(verifier, VT_CHIP_FAMILY) && ++ VerifyField(verifier, VT_CHIP_FAMILY, 4) && + verifier.EndTable(); + } + EdgeTpuDeviceSpecT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1509,6 +1505,7 @@ struct EdgeTpuDeviceSpec FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct EdgeTpuDeviceSpecBuilder { ++ typedef EdgeTpuDeviceSpec Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_platform_type(tflite::EdgeTpuDeviceSpec_::PlatformType platform_type) { +@@ -1527,7 +1524,6 @@ struct EdgeTpuDeviceSpecBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- EdgeTpuDeviceSpecBuilder &operator=(const EdgeTpuDeviceSpecBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1568,16 +1564,13 @@ flatbuffers::Offset CreateEdgeTpuDeviceSpec(flatbuffers::Flat + + struct EdgeTpuInactivePowerConfigT : public flatbuffers::NativeTable { + typedef EdgeTpuInactivePowerConfig TableType; +- tflite::EdgeTpuPowerState inactive_power_state; +- int64_t inactive_timeout_us; +- EdgeTpuInactivePowerConfigT() +- : inactive_power_state(tflite::EdgeTpuPowerState_UNDEFINED_POWERSTATE), +- inactive_timeout_us(0) { +- } ++ tflite::EdgeTpuPowerState inactive_power_state = tflite::EdgeTpuPowerState_UNDEFINED_POWERSTATE; ++ int64_t inactive_timeout_us = 0; + }; + + struct EdgeTpuInactivePowerConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EdgeTpuInactivePowerConfigT NativeTableType; ++ typedef EdgeTpuInactivePowerConfigBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INACTIVE_POWER_STATE = 4, + VT_INACTIVE_TIMEOUT_US = 6 +@@ -1590,8 +1583,8 @@ struct EdgeTpuInactivePowerConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers: + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_INACTIVE_POWER_STATE) && +- VerifyField(verifier, VT_INACTIVE_TIMEOUT_US) && ++ VerifyField(verifier, VT_INACTIVE_POWER_STATE, 4) && ++ VerifyField(verifier, VT_INACTIVE_TIMEOUT_US, 8) && + verifier.EndTable(); + } + EdgeTpuInactivePowerConfigT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1600,6 +1593,7 @@ struct EdgeTpuInactivePowerConfig FLATBUFFERS_FINAL_CLASS : private flatbuffers: + }; + + struct EdgeTpuInactivePowerConfigBuilder { ++ typedef EdgeTpuInactivePowerConfig Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_inactive_power_state(tflite::EdgeTpuPowerState inactive_power_state) { +@@ -1612,7 +1606,6 @@ struct EdgeTpuInactivePowerConfigBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- EdgeTpuInactivePowerConfigBuilder &operator=(const EdgeTpuInactivePowerConfigBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1634,23 +1627,22 @@ flatbuffers::Offset CreateEdgeTpuInactivePowerConfig + + struct EdgeTpuSettingsT : public flatbuffers::NativeTable { + typedef EdgeTpuSettings TableType; +- tflite::EdgeTpuPowerState inference_power_state; +- std::vector> inactive_power_configs; +- int32_t inference_priority; +- std::unique_ptr edgetpu_device_spec; +- std::string model_token; +- tflite::EdgeTpuSettings_::FloatTruncationType float_truncation_type; +- tflite::EdgeTpuSettings_::QosClass qos_class; +- EdgeTpuSettingsT() +- : inference_power_state(tflite::EdgeTpuPowerState_UNDEFINED_POWERSTATE), +- inference_priority(-1), +- float_truncation_type(tflite::EdgeTpuSettings_::FloatTruncationType_UNSPECIFIED), +- qos_class(tflite::EdgeTpuSettings_::QosClass_QOS_UNDEFINED) { +- } ++ tflite::EdgeTpuPowerState inference_power_state = tflite::EdgeTpuPowerState_UNDEFINED_POWERSTATE; ++ std::vector> inactive_power_configs{}; ++ int32_t inference_priority = -1; ++ std::unique_ptr edgetpu_device_spec{}; ++ std::string model_token{}; ++ tflite::EdgeTpuSettings_::FloatTruncationType float_truncation_type = tflite::EdgeTpuSettings_::FloatTruncationType_UNSPECIFIED; ++ tflite::EdgeTpuSettings_::QosClass qos_class = tflite::EdgeTpuSettings_::QosClass_QOS_UNDEFINED; ++ EdgeTpuSettingsT() = default; ++ EdgeTpuSettingsT(const EdgeTpuSettingsT &o); ++ EdgeTpuSettingsT(EdgeTpuSettingsT&&) FLATBUFFERS_NOEXCEPT = default; ++ EdgeTpuSettingsT &operator=(EdgeTpuSettingsT o) FLATBUFFERS_NOEXCEPT; + }; + + struct EdgeTpuSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EdgeTpuSettingsT NativeTableType; ++ typedef EdgeTpuSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INFERENCE_POWER_STATE = 4, + VT_INACTIVE_POWER_CONFIGS = 6, +@@ -1683,17 +1675,17 @@ struct EdgeTpuSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_INFERENCE_POWER_STATE) && ++ VerifyField(verifier, VT_INFERENCE_POWER_STATE, 4) && + VerifyOffset(verifier, VT_INACTIVE_POWER_CONFIGS) && + verifier.VerifyVector(inactive_power_configs()) && + verifier.VerifyVectorOfTables(inactive_power_configs()) && +- VerifyField(verifier, VT_INFERENCE_PRIORITY) && ++ VerifyField(verifier, VT_INFERENCE_PRIORITY, 4) && + VerifyOffset(verifier, VT_EDGETPU_DEVICE_SPEC) && + verifier.VerifyTable(edgetpu_device_spec()) && + VerifyOffset(verifier, VT_MODEL_TOKEN) && + verifier.VerifyString(model_token()) && +- VerifyField(verifier, VT_FLOAT_TRUNCATION_TYPE) && +- VerifyField(verifier, VT_QOS_CLASS) && ++ VerifyField(verifier, VT_FLOAT_TRUNCATION_TYPE, 4) && ++ VerifyField(verifier, VT_QOS_CLASS, 4) && + verifier.EndTable(); + } + EdgeTpuSettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1702,6 +1694,7 @@ struct EdgeTpuSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct EdgeTpuSettingsBuilder { ++ typedef EdgeTpuSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_inference_power_state(tflite::EdgeTpuPowerState inference_power_state) { +@@ -1729,7 +1722,6 @@ struct EdgeTpuSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- EdgeTpuSettingsBuilder &operator=(const EdgeTpuSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1783,19 +1775,15 @@ flatbuffers::Offset CreateEdgeTpuSettings(flatbuffers::FlatBuff + + struct CoralSettingsT : public flatbuffers::NativeTable { + typedef CoralSettings TableType; +- std::string device; +- tflite::CoralSettings_::Performance performance; +- bool usb_always_dfu; +- int32_t usb_max_bulk_in_queue_length; +- CoralSettingsT() +- : performance(tflite::CoralSettings_::Performance_UNDEFINED), +- usb_always_dfu(false), +- usb_max_bulk_in_queue_length(0) { +- } ++ std::string device{}; ++ tflite::CoralSettings_::Performance performance = tflite::CoralSettings_::Performance_UNDEFINED; ++ bool usb_always_dfu = false; ++ int32_t usb_max_bulk_in_queue_length = 0; + }; + + struct CoralSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CoralSettingsT NativeTableType; ++ typedef CoralSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEVICE = 4, + VT_PERFORMANCE = 6, +@@ -1818,9 +1806,9 @@ struct CoralSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_DEVICE) && + verifier.VerifyString(device()) && +- VerifyField(verifier, VT_PERFORMANCE) && +- VerifyField(verifier, VT_USB_ALWAYS_DFU) && +- VerifyField(verifier, VT_USB_MAX_BULK_IN_QUEUE_LENGTH) && ++ VerifyField(verifier, VT_PERFORMANCE, 4) && ++ VerifyField(verifier, VT_USB_ALWAYS_DFU, 1) && ++ VerifyField(verifier, VT_USB_MAX_BULK_IN_QUEUE_LENGTH, 4) && + verifier.EndTable(); + } + CoralSettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1829,6 +1817,7 @@ struct CoralSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CoralSettingsBuilder { ++ typedef CoralSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_device(flatbuffers::Offset device) { +@@ -1847,7 +1836,6 @@ struct CoralSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CoralSettingsBuilder &operator=(const CoralSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1888,14 +1876,12 @@ flatbuffers::Offset CreateCoralSettings(flatbuffers::FlatBufferBu + + struct CPUSettingsT : public flatbuffers::NativeTable { + typedef CPUSettings TableType; +- int32_t num_threads; +- CPUSettingsT() +- : num_threads(-1) { +- } ++ int32_t num_threads = -1; + }; + + struct CPUSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CPUSettingsT NativeTableType; ++ typedef CPUSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_THREADS = 4 + }; +@@ -1904,7 +1890,7 @@ struct CPUSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NUM_THREADS) && ++ VerifyField(verifier, VT_NUM_THREADS, 4) && + verifier.EndTable(); + } + CPUSettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -1913,6 +1899,7 @@ struct CPUSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CPUSettingsBuilder { ++ typedef CPUSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_num_threads(int32_t num_threads) { +@@ -1922,7 +1909,6 @@ struct CPUSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CPUSettingsBuilder &operator=(const CPUSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -1942,25 +1928,26 @@ flatbuffers::Offset CreateCPUSettings(flatbuffers::FlatBufferBuilde + + struct TFLiteSettingsT : public flatbuffers::NativeTable { + typedef TFLiteSettings TableType; +- tflite::Delegate delegate; +- std::unique_ptr nnapi_settings; +- std::unique_ptr gpu_settings; +- std::unique_ptr hexagon_settings; +- std::unique_ptr xnnpack_settings; +- std::unique_ptr coreml_settings; +- std::unique_ptr cpu_settings; +- int32_t max_delegated_partitions; +- std::unique_ptr edgetpu_settings; +- std::unique_ptr coral_settings; +- std::unique_ptr fallback_settings; +- TFLiteSettingsT() +- : delegate(tflite::Delegate_NONE), +- max_delegated_partitions(0) { +- } ++ tflite::Delegate delegate = tflite::Delegate_NONE; ++ std::unique_ptr nnapi_settings{}; ++ std::unique_ptr gpu_settings{}; ++ std::unique_ptr hexagon_settings{}; ++ std::unique_ptr xnnpack_settings{}; ++ std::unique_ptr coreml_settings{}; ++ std::unique_ptr cpu_settings{}; ++ int32_t max_delegated_partitions = 0; ++ std::unique_ptr edgetpu_settings{}; ++ std::unique_ptr coral_settings{}; ++ std::unique_ptr fallback_settings{}; ++ TFLiteSettingsT() = default; ++ TFLiteSettingsT(const TFLiteSettingsT &o); ++ TFLiteSettingsT(TFLiteSettingsT&&) FLATBUFFERS_NOEXCEPT = default; ++ TFLiteSettingsT &operator=(TFLiteSettingsT o) FLATBUFFERS_NOEXCEPT; + }; + + struct TFLiteSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TFLiteSettingsT NativeTableType; ++ typedef TFLiteSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DELEGATE = 4, + VT_NNAPI_SETTINGS = 6, +@@ -2009,7 +1996,7 @@ struct TFLiteSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_DELEGATE) && ++ VerifyField(verifier, VT_DELEGATE, 4) && + VerifyOffset(verifier, VT_NNAPI_SETTINGS) && + verifier.VerifyTable(nnapi_settings()) && + VerifyOffset(verifier, VT_GPU_SETTINGS) && +@@ -2022,7 +2009,7 @@ struct TFLiteSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + verifier.VerifyTable(coreml_settings()) && + VerifyOffset(verifier, VT_CPU_SETTINGS) && + verifier.VerifyTable(cpu_settings()) && +- VerifyField(verifier, VT_MAX_DELEGATED_PARTITIONS) && ++ VerifyField(verifier, VT_MAX_DELEGATED_PARTITIONS, 4) && + VerifyOffset(verifier, VT_EDGETPU_SETTINGS) && + verifier.VerifyTable(edgetpu_settings()) && + VerifyOffset(verifier, VT_CORAL_SETTINGS) && +@@ -2037,6 +2024,7 @@ struct TFLiteSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TFLiteSettingsBuilder { ++ typedef TFLiteSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_delegate(tflite::Delegate delegate) { +@@ -2076,7 +2064,6 @@ struct TFLiteSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TFLiteSettingsBuilder &operator=(const TFLiteSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2116,16 +2103,13 @@ flatbuffers::Offset CreateTFLiteSettings(flatbuffers::FlatBuffer + + struct FallbackSettingsT : public flatbuffers::NativeTable { + typedef FallbackSettings TableType; +- bool allow_automatic_fallback_on_compilation_error; +- bool allow_automatic_fallback_on_execution_error; +- FallbackSettingsT() +- : allow_automatic_fallback_on_compilation_error(false), +- allow_automatic_fallback_on_execution_error(false) { +- } ++ bool allow_automatic_fallback_on_compilation_error = false; ++ bool allow_automatic_fallback_on_execution_error = false; + }; + + struct FallbackSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FallbackSettingsT NativeTableType; ++ typedef FallbackSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALLOW_AUTOMATIC_FALLBACK_ON_COMPILATION_ERROR = 4, + VT_ALLOW_AUTOMATIC_FALLBACK_ON_EXECUTION_ERROR = 6 +@@ -2138,8 +2122,8 @@ struct FallbackSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_ALLOW_AUTOMATIC_FALLBACK_ON_COMPILATION_ERROR) && +- VerifyField(verifier, VT_ALLOW_AUTOMATIC_FALLBACK_ON_EXECUTION_ERROR) && ++ VerifyField(verifier, VT_ALLOW_AUTOMATIC_FALLBACK_ON_COMPILATION_ERROR, 1) && ++ VerifyField(verifier, VT_ALLOW_AUTOMATIC_FALLBACK_ON_EXECUTION_ERROR, 1) && + verifier.EndTable(); + } + FallbackSettingsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -2148,6 +2132,7 @@ struct FallbackSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct FallbackSettingsBuilder { ++ typedef FallbackSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_allow_automatic_fallback_on_compilation_error(bool allow_automatic_fallback_on_compilation_error) { +@@ -2160,7 +2145,6 @@ struct FallbackSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FallbackSettingsBuilder &operator=(const FallbackSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2182,14 +2166,13 @@ flatbuffers::Offset CreateFallbackSettings(flatbuffers::FlatBu + + struct BenchmarkMetricT : public flatbuffers::NativeTable { + typedef BenchmarkMetric TableType; +- std::string name; +- std::vector values; +- BenchmarkMetricT() { +- } ++ std::string name{}; ++ std::vector values{}; + }; + + struct BenchmarkMetric FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BenchmarkMetricT NativeTableType; ++ typedef BenchmarkMetricBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NAME = 4, + VT_VALUES = 6 +@@ -2214,6 +2197,7 @@ struct BenchmarkMetric FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BenchmarkMetricBuilder { ++ typedef BenchmarkMetric Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { +@@ -2226,7 +2210,6 @@ struct BenchmarkMetricBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BenchmarkMetricBuilder &operator=(const BenchmarkMetricBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2260,19 +2243,20 @@ flatbuffers::Offset CreateBenchmarkMetric(flatbuffers::FlatBuff + + struct BenchmarkResultT : public flatbuffers::NativeTable { + typedef BenchmarkResult TableType; +- std::vector initialization_time_us; +- std::vector inference_time_us; +- int32_t max_memory_kb; +- bool ok; +- std::vector> metrics; +- BenchmarkResultT() +- : max_memory_kb(0), +- ok(false) { +- } ++ std::vector initialization_time_us{}; ++ std::vector inference_time_us{}; ++ int32_t max_memory_kb = 0; ++ bool ok = false; ++ std::vector> metrics{}; ++ BenchmarkResultT() = default; ++ BenchmarkResultT(const BenchmarkResultT &o); ++ BenchmarkResultT(BenchmarkResultT&&) FLATBUFFERS_NOEXCEPT = default; ++ BenchmarkResultT &operator=(BenchmarkResultT o) FLATBUFFERS_NOEXCEPT; + }; + + struct BenchmarkResult FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BenchmarkResultT NativeTableType; ++ typedef BenchmarkResultBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INITIALIZATION_TIME_US = 4, + VT_INFERENCE_TIME_US = 6, +@@ -2301,8 +2285,8 @@ struct BenchmarkResult FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + verifier.VerifyVector(initialization_time_us()) && + VerifyOffset(verifier, VT_INFERENCE_TIME_US) && + verifier.VerifyVector(inference_time_us()) && +- VerifyField(verifier, VT_MAX_MEMORY_KB) && +- VerifyField(verifier, VT_OK) && ++ VerifyField(verifier, VT_MAX_MEMORY_KB, 4) && ++ VerifyField(verifier, VT_OK, 1) && + VerifyOffset(verifier, VT_METRICS) && + verifier.VerifyVector(metrics()) && + verifier.VerifyVectorOfTables(metrics()) && +@@ -2314,6 +2298,7 @@ struct BenchmarkResult FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BenchmarkResultBuilder { ++ typedef BenchmarkResult Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_initialization_time_us(flatbuffers::Offset> initialization_time_us) { +@@ -2335,7 +2320,6 @@ struct BenchmarkResultBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BenchmarkResultBuilder &operator=(const BenchmarkResultBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2382,18 +2366,14 @@ flatbuffers::Offset CreateBenchmarkResult(flatbuffers::FlatBuff + + struct ErrorCodeT : public flatbuffers::NativeTable { + typedef ErrorCode TableType; +- tflite::Delegate source; +- int32_t tflite_error; +- int64_t underlying_api_error; +- ErrorCodeT() +- : source(tflite::Delegate_NONE), +- tflite_error(0), +- underlying_api_error(0) { +- } ++ tflite::Delegate source = tflite::Delegate_NONE; ++ int32_t tflite_error = 0; ++ int64_t underlying_api_error = 0; + }; + + struct ErrorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ErrorCodeT NativeTableType; ++ typedef ErrorCodeBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SOURCE = 4, + VT_TFLITE_ERROR = 6, +@@ -2410,9 +2390,9 @@ struct ErrorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_SOURCE) && +- VerifyField(verifier, VT_TFLITE_ERROR) && +- VerifyField(verifier, VT_UNDERLYING_API_ERROR) && ++ VerifyField(verifier, VT_SOURCE, 4) && ++ VerifyField(verifier, VT_TFLITE_ERROR, 4) && ++ VerifyField(verifier, VT_UNDERLYING_API_ERROR, 8) && + verifier.EndTable(); + } + ErrorCodeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -2421,6 +2401,7 @@ struct ErrorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ErrorCodeBuilder { ++ typedef ErrorCode Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_source(tflite::Delegate source) { +@@ -2436,7 +2417,6 @@ struct ErrorCodeBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ErrorCodeBuilder &operator=(const ErrorCodeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2460,21 +2440,20 @@ flatbuffers::Offset CreateErrorCode(flatbuffers::FlatBufferBuilder &_ + + struct BenchmarkErrorT : public flatbuffers::NativeTable { + typedef BenchmarkError TableType; +- tflite::BenchmarkStage stage; +- int32_t exit_code; +- int32_t signal; +- std::vector> error_code; +- int32_t mini_benchmark_error_code; +- BenchmarkErrorT() +- : stage(tflite::BenchmarkStage_UNKNOWN), +- exit_code(0), +- signal(0), +- mini_benchmark_error_code(0) { +- } ++ tflite::BenchmarkStage stage = tflite::BenchmarkStage_UNKNOWN; ++ int32_t exit_code = 0; ++ int32_t signal = 0; ++ std::vector> error_code{}; ++ int32_t mini_benchmark_error_code = 0; ++ BenchmarkErrorT() = default; ++ BenchmarkErrorT(const BenchmarkErrorT &o); ++ BenchmarkErrorT(BenchmarkErrorT&&) FLATBUFFERS_NOEXCEPT = default; ++ BenchmarkErrorT &operator=(BenchmarkErrorT o) FLATBUFFERS_NOEXCEPT; + }; + + struct BenchmarkError FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BenchmarkErrorT NativeTableType; ++ typedef BenchmarkErrorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_STAGE = 4, + VT_EXIT_CODE = 6, +@@ -2499,13 +2478,13 @@ struct BenchmarkError FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_STAGE) && +- VerifyField(verifier, VT_EXIT_CODE) && +- VerifyField(verifier, VT_SIGNAL) && ++ VerifyField(verifier, VT_STAGE, 4) && ++ VerifyField(verifier, VT_EXIT_CODE, 4) && ++ VerifyField(verifier, VT_SIGNAL, 4) && + VerifyOffset(verifier, VT_ERROR_CODE) && + verifier.VerifyVector(error_code()) && + verifier.VerifyVectorOfTables(error_code()) && +- VerifyField(verifier, VT_MINI_BENCHMARK_ERROR_CODE) && ++ VerifyField(verifier, VT_MINI_BENCHMARK_ERROR_CODE, 4) && + verifier.EndTable(); + } + BenchmarkErrorT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -2514,6 +2493,7 @@ struct BenchmarkError FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BenchmarkErrorBuilder { ++ typedef BenchmarkError Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_stage(tflite::BenchmarkStage stage) { +@@ -2535,7 +2515,6 @@ struct BenchmarkErrorBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BenchmarkErrorBuilder &operator=(const BenchmarkErrorBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2580,21 +2559,21 @@ flatbuffers::Offset CreateBenchmarkError(flatbuffers::FlatBuffer + + struct BenchmarkEventT : public flatbuffers::NativeTable { + typedef BenchmarkEvent TableType; +- std::unique_ptr tflite_settings; +- tflite::BenchmarkEventType event_type; +- std::unique_ptr result; +- std::unique_ptr error; +- int64_t boottime_us; +- int64_t wallclock_us; +- BenchmarkEventT() +- : event_type(tflite::BenchmarkEventType_UNDEFINED_BENCHMARK_EVENT_TYPE), +- boottime_us(0), +- wallclock_us(0) { +- } ++ std::unique_ptr tflite_settings{}; ++ tflite::BenchmarkEventType event_type = tflite::BenchmarkEventType_UNDEFINED_BENCHMARK_EVENT_TYPE; ++ std::unique_ptr result{}; ++ std::unique_ptr error{}; ++ int64_t boottime_us = 0; ++ int64_t wallclock_us = 0; ++ BenchmarkEventT() = default; ++ BenchmarkEventT(const BenchmarkEventT &o); ++ BenchmarkEventT(BenchmarkEventT&&) FLATBUFFERS_NOEXCEPT = default; ++ BenchmarkEventT &operator=(BenchmarkEventT o) FLATBUFFERS_NOEXCEPT; + }; + + struct BenchmarkEvent FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BenchmarkEventT NativeTableType; ++ typedef BenchmarkEventBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TFLITE_SETTINGS = 4, + VT_EVENT_TYPE = 6, +@@ -2625,13 +2604,13 @@ struct BenchmarkEvent FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_TFLITE_SETTINGS) && + verifier.VerifyTable(tflite_settings()) && +- VerifyField(verifier, VT_EVENT_TYPE) && ++ VerifyField(verifier, VT_EVENT_TYPE, 4) && + VerifyOffset(verifier, VT_RESULT) && + verifier.VerifyTable(result()) && + VerifyOffset(verifier, VT_ERROR) && + verifier.VerifyTable(error()) && +- VerifyField(verifier, VT_BOOTTIME_US) && +- VerifyField(verifier, VT_WALLCLOCK_US) && ++ VerifyField(verifier, VT_BOOTTIME_US, 8) && ++ VerifyField(verifier, VT_WALLCLOCK_US, 8) && + verifier.EndTable(); + } + BenchmarkEventT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -2640,6 +2619,7 @@ struct BenchmarkEvent FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BenchmarkEventBuilder { ++ typedef BenchmarkEvent Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tflite_settings(flatbuffers::Offset tflite_settings) { +@@ -2664,7 +2644,6 @@ struct BenchmarkEventBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BenchmarkEventBuilder &operator=(const BenchmarkEventBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2694,17 +2673,18 @@ flatbuffers::Offset CreateBenchmarkEvent(flatbuffers::FlatBuffer + + struct BestAccelerationDecisionT : public flatbuffers::NativeTable { + typedef BestAccelerationDecision TableType; +- int32_t number_of_source_events; +- std::unique_ptr min_latency_event; +- int64_t min_inference_time_us; +- BestAccelerationDecisionT() +- : number_of_source_events(0), +- min_inference_time_us(0) { +- } ++ int32_t number_of_source_events = 0; ++ std::unique_ptr min_latency_event{}; ++ int64_t min_inference_time_us = 0; ++ BestAccelerationDecisionT() = default; ++ BestAccelerationDecisionT(const BestAccelerationDecisionT &o); ++ BestAccelerationDecisionT(BestAccelerationDecisionT&&) FLATBUFFERS_NOEXCEPT = default; ++ BestAccelerationDecisionT &operator=(BestAccelerationDecisionT o) FLATBUFFERS_NOEXCEPT; + }; + + struct BestAccelerationDecision FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BestAccelerationDecisionT NativeTableType; ++ typedef BestAccelerationDecisionBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUMBER_OF_SOURCE_EVENTS = 4, + VT_MIN_LATENCY_EVENT = 6, +@@ -2721,10 +2701,10 @@ struct BestAccelerationDecision FLATBUFFERS_FINAL_CLASS : private flatbuffers::T + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NUMBER_OF_SOURCE_EVENTS) && ++ VerifyField(verifier, VT_NUMBER_OF_SOURCE_EVENTS, 4) && + VerifyOffset(verifier, VT_MIN_LATENCY_EVENT) && + verifier.VerifyTable(min_latency_event()) && +- VerifyField(verifier, VT_MIN_INFERENCE_TIME_US) && ++ VerifyField(verifier, VT_MIN_INFERENCE_TIME_US, 8) && + verifier.EndTable(); + } + BestAccelerationDecisionT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -2733,6 +2713,7 @@ struct BestAccelerationDecision FLATBUFFERS_FINAL_CLASS : private flatbuffers::T + }; + + struct BestAccelerationDecisionBuilder { ++ typedef BestAccelerationDecision Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_number_of_source_events(int32_t number_of_source_events) { +@@ -2748,7 +2729,6 @@ struct BestAccelerationDecisionBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BestAccelerationDecisionBuilder &operator=(const BestAccelerationDecisionBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2772,14 +2752,12 @@ flatbuffers::Offset CreateBestAccelerationDecision(fla + + struct BenchmarkInitializationFailureT : public flatbuffers::NativeTable { + typedef BenchmarkInitializationFailure TableType; +- int32_t initialization_status; +- BenchmarkInitializationFailureT() +- : initialization_status(0) { +- } ++ int32_t initialization_status = 0; + }; + + struct BenchmarkInitializationFailure FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BenchmarkInitializationFailureT NativeTableType; ++ typedef BenchmarkInitializationFailureBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INITIALIZATION_STATUS = 4 + }; +@@ -2788,7 +2766,7 @@ struct BenchmarkInitializationFailure FLATBUFFERS_FINAL_CLASS : private flatbuff + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_INITIALIZATION_STATUS) && ++ VerifyField(verifier, VT_INITIALIZATION_STATUS, 4) && + verifier.EndTable(); + } + BenchmarkInitializationFailureT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -2797,6 +2775,7 @@ struct BenchmarkInitializationFailure FLATBUFFERS_FINAL_CLASS : private flatbuff + }; + + struct BenchmarkInitializationFailureBuilder { ++ typedef BenchmarkInitializationFailure Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_initialization_status(int32_t initialization_status) { +@@ -2806,7 +2785,6 @@ struct BenchmarkInitializationFailureBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BenchmarkInitializationFailureBuilder &operator=(const BenchmarkInitializationFailureBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2826,17 +2804,19 @@ flatbuffers::Offset CreateBenchmarkInitializatio + + struct MiniBenchmarkEventT : public flatbuffers::NativeTable { + typedef MiniBenchmarkEvent TableType; +- bool is_log_flushing_event; +- std::unique_ptr best_acceleration_decision; +- std::unique_ptr initialization_failure; +- std::unique_ptr benchmark_event; +- MiniBenchmarkEventT() +- : is_log_flushing_event(false) { +- } ++ bool is_log_flushing_event = false; ++ std::unique_ptr best_acceleration_decision{}; ++ std::unique_ptr initialization_failure{}; ++ std::unique_ptr benchmark_event{}; ++ MiniBenchmarkEventT() = default; ++ MiniBenchmarkEventT(const MiniBenchmarkEventT &o); ++ MiniBenchmarkEventT(MiniBenchmarkEventT&&) FLATBUFFERS_NOEXCEPT = default; ++ MiniBenchmarkEventT &operator=(MiniBenchmarkEventT o) FLATBUFFERS_NOEXCEPT; + }; + + struct MiniBenchmarkEvent FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MiniBenchmarkEventT NativeTableType; ++ typedef MiniBenchmarkEventBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IS_LOG_FLUSHING_EVENT = 4, + VT_BEST_ACCELERATION_DECISION = 6, +@@ -2857,7 +2837,7 @@ struct MiniBenchmarkEvent FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_IS_LOG_FLUSHING_EVENT) && ++ VerifyField(verifier, VT_IS_LOG_FLUSHING_EVENT, 1) && + VerifyOffset(verifier, VT_BEST_ACCELERATION_DECISION) && + verifier.VerifyTable(best_acceleration_decision()) && + VerifyOffset(verifier, VT_INITIALIZATION_FAILURE) && +@@ -2872,6 +2852,7 @@ struct MiniBenchmarkEvent FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MiniBenchmarkEventBuilder { ++ typedef MiniBenchmarkEvent Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_is_log_flushing_event(bool is_log_flushing_event) { +@@ -2890,7 +2871,6 @@ struct MiniBenchmarkEventBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MiniBenchmarkEventBuilder &operator=(const MiniBenchmarkEventBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -2916,19 +2896,15 @@ flatbuffers::Offset CreateMiniBenchmarkEvent(flatbuffers::Fl + + struct ModelFileT : public flatbuffers::NativeTable { + typedef ModelFile TableType; +- std::string filename; +- int64_t fd; +- int64_t offset; +- int64_t length; +- ModelFileT() +- : fd(0), +- offset(0), +- length(0) { +- } ++ std::string filename{}; ++ int64_t fd = 0; ++ int64_t offset = 0; ++ int64_t length = 0; + }; + + struct ModelFile FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ModelFileT NativeTableType; ++ typedef ModelFileBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FILENAME = 4, + VT_FD = 6, +@@ -2951,9 +2927,9 @@ struct ModelFile FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_FILENAME) && + verifier.VerifyString(filename()) && +- VerifyField(verifier, VT_FD) && +- VerifyField(verifier, VT_OFFSET) && +- VerifyField(verifier, VT_LENGTH) && ++ VerifyField(verifier, VT_FD, 8) && ++ VerifyField(verifier, VT_OFFSET, 8) && ++ VerifyField(verifier, VT_LENGTH, 8) && + verifier.EndTable(); + } + ModelFileT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -2962,6 +2938,7 @@ struct ModelFile FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ModelFileBuilder { ++ typedef ModelFile Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_filename(flatbuffers::Offset filename) { +@@ -2980,7 +2957,6 @@ struct ModelFileBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ModelFileBuilder &operator=(const ModelFileBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3021,14 +2997,13 @@ flatbuffers::Offset CreateModelFile(flatbuffers::FlatBufferBuilder &_ + + struct BenchmarkStoragePathsT : public flatbuffers::NativeTable { + typedef BenchmarkStoragePaths TableType; +- std::string storage_file_path; +- std::string data_directory_path; +- BenchmarkStoragePathsT() { +- } ++ std::string storage_file_path{}; ++ std::string data_directory_path{}; + }; + + struct BenchmarkStoragePaths FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BenchmarkStoragePathsT NativeTableType; ++ typedef BenchmarkStoragePathsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_STORAGE_FILE_PATH = 4, + VT_DATA_DIRECTORY_PATH = 6 +@@ -3053,6 +3028,7 @@ struct BenchmarkStoragePaths FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct BenchmarkStoragePathsBuilder { ++ typedef BenchmarkStoragePaths Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_storage_file_path(flatbuffers::Offset storage_file_path) { +@@ -3065,7 +3041,6 @@ struct BenchmarkStoragePathsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BenchmarkStoragePathsBuilder &operator=(const BenchmarkStoragePathsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3099,15 +3074,18 @@ flatbuffers::Offset CreateBenchmarkStoragePaths(flatbuffe + + struct MinibenchmarkSettingsT : public flatbuffers::NativeTable { + typedef MinibenchmarkSettings TableType; +- std::vector> settings_to_test; +- std::unique_ptr model_file; +- std::unique_ptr storage_paths; +- MinibenchmarkSettingsT() { +- } ++ std::vector> settings_to_test{}; ++ std::unique_ptr model_file{}; ++ std::unique_ptr storage_paths{}; ++ MinibenchmarkSettingsT() = default; ++ MinibenchmarkSettingsT(const MinibenchmarkSettingsT &o); ++ MinibenchmarkSettingsT(MinibenchmarkSettingsT&&) FLATBUFFERS_NOEXCEPT = default; ++ MinibenchmarkSettingsT &operator=(MinibenchmarkSettingsT o) FLATBUFFERS_NOEXCEPT; + }; + + struct MinibenchmarkSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MinibenchmarkSettingsT NativeTableType; ++ typedef MinibenchmarkSettingsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SETTINGS_TO_TEST = 4, + VT_MODEL_FILE = 6, +@@ -3139,6 +3117,7 @@ struct MinibenchmarkSettings FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct MinibenchmarkSettingsBuilder { ++ typedef MinibenchmarkSettings Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_settings_to_test(flatbuffers::Offset>> settings_to_test) { +@@ -3154,7 +3133,6 @@ struct MinibenchmarkSettingsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MinibenchmarkSettingsBuilder &operator=(const MinibenchmarkSettingsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3204,20 +3182,37 @@ inline bool operator!=(const ComputeSettingsT &lhs, const ComputeSettingsT &rhs) + } + + ++inline ComputeSettingsT::ComputeSettingsT(const ComputeSettingsT &o) ++ : preference(o.preference), ++ tflite_settings((o.tflite_settings) ? new tflite::TFLiteSettingsT(*o.tflite_settings) : nullptr), ++ model_namespace_for_statistics(o.model_namespace_for_statistics), ++ model_identifier_for_statistics(o.model_identifier_for_statistics), ++ settings_to_test_locally((o.settings_to_test_locally) ? new tflite::MinibenchmarkSettingsT(*o.settings_to_test_locally) : nullptr) { ++} ++ ++inline ComputeSettingsT &ComputeSettingsT::operator=(ComputeSettingsT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(preference, o.preference); ++ std::swap(tflite_settings, o.tflite_settings); ++ std::swap(model_namespace_for_statistics, o.model_namespace_for_statistics); ++ std::swap(model_identifier_for_statistics, o.model_identifier_for_statistics); ++ std::swap(settings_to_test_locally, o.settings_to_test_locally); ++ return *this; ++} ++ + inline ComputeSettingsT *ComputeSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ComputeSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ComputeSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ComputeSettings::UnPackTo(ComputeSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = preference(); _o->preference = _e; } +- { auto _e = tflite_settings(); if (_e) _o->tflite_settings = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = tflite_settings(); if (_e) { if(_o->tflite_settings) { _e->UnPackTo(_o->tflite_settings.get(), _resolver); } else { _o->tflite_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = model_namespace_for_statistics(); if (_e) _o->model_namespace_for_statistics = _e->str(); } + { auto _e = model_identifier_for_statistics(); if (_e) _o->model_identifier_for_statistics = _e->str(); } +- { auto _e = settings_to_test_locally(); if (_e) _o->settings_to_test_locally = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = settings_to_test_locally(); if (_e) { if(_o->settings_to_test_locally) { _e->UnPackTo(_o->settings_to_test_locally.get(), _resolver); } else { _o->settings_to_test_locally = std::unique_ptr(_e->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset ComputeSettings::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ComputeSettingsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3264,10 +3259,41 @@ inline bool operator!=(const NNAPISettingsT &lhs, const NNAPISettingsT &rhs) { + } + + ++inline NNAPISettingsT::NNAPISettingsT(const NNAPISettingsT &o) ++ : accelerator_name(o.accelerator_name), ++ cache_directory(o.cache_directory), ++ model_token(o.model_token), ++ execution_preference(o.execution_preference), ++ no_of_nnapi_instances_to_cache(o.no_of_nnapi_instances_to_cache), ++ fallback_settings((o.fallback_settings) ? new tflite::FallbackSettingsT(*o.fallback_settings) : nullptr), ++ allow_nnapi_cpu_on_android_10_plus(o.allow_nnapi_cpu_on_android_10_plus), ++ execution_priority(o.execution_priority), ++ allow_dynamic_dimensions(o.allow_dynamic_dimensions), ++ allow_fp16_precision_for_fp32(o.allow_fp16_precision_for_fp32), ++ use_burst_computation(o.use_burst_computation), ++ support_library_handle(o.support_library_handle) { ++} ++ ++inline NNAPISettingsT &NNAPISettingsT::operator=(NNAPISettingsT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(accelerator_name, o.accelerator_name); ++ std::swap(cache_directory, o.cache_directory); ++ std::swap(model_token, o.model_token); ++ std::swap(execution_preference, o.execution_preference); ++ std::swap(no_of_nnapi_instances_to_cache, o.no_of_nnapi_instances_to_cache); ++ std::swap(fallback_settings, o.fallback_settings); ++ std::swap(allow_nnapi_cpu_on_android_10_plus, o.allow_nnapi_cpu_on_android_10_plus); ++ std::swap(execution_priority, o.execution_priority); ++ std::swap(allow_dynamic_dimensions, o.allow_dynamic_dimensions); ++ std::swap(allow_fp16_precision_for_fp32, o.allow_fp16_precision_for_fp32); ++ std::swap(use_burst_computation, o.use_burst_computation); ++ std::swap(support_library_handle, o.support_library_handle); ++ return *this; ++} ++ + inline NNAPISettingsT *NNAPISettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NNAPISettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NNAPISettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void NNAPISettings::UnPackTo(NNAPISettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3278,7 +3304,7 @@ inline void NNAPISettings::UnPackTo(NNAPISettingsT *_o, const flatbuffers::resol + { auto _e = model_token(); if (_e) _o->model_token = _e->str(); } + { auto _e = execution_preference(); _o->execution_preference = _e; } + { auto _e = no_of_nnapi_instances_to_cache(); _o->no_of_nnapi_instances_to_cache = _e; } +- { auto _e = fallback_settings(); if (_e) _o->fallback_settings = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = fallback_settings(); if (_e) { if(_o->fallback_settings) { _e->UnPackTo(_o->fallback_settings.get(), _resolver); } else { _o->fallback_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = allow_nnapi_cpu_on_android_10_plus(); _o->allow_nnapi_cpu_on_android_10_plus = _e; } + { auto _e = execution_priority(); _o->execution_priority = _e; } + { auto _e = allow_dynamic_dimensions(); _o->allow_dynamic_dimensions = _e; } +@@ -3343,9 +3369,9 @@ inline bool operator!=(const GPUSettingsT &lhs, const GPUSettingsT &rhs) { + + + inline GPUSettingsT *GPUSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GPUSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GPUSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GPUSettings::UnPackTo(GPUSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3407,9 +3433,9 @@ inline bool operator!=(const HexagonSettingsT &lhs, const HexagonSettingsT &rhs) + + + inline HexagonSettingsT *HexagonSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new HexagonSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new HexagonSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void HexagonSettings::UnPackTo(HexagonSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3453,9 +3479,9 @@ inline bool operator!=(const XNNPackSettingsT &lhs, const XNNPackSettingsT &rhs) + + + inline XNNPackSettingsT *XNNPackSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new XNNPackSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new XNNPackSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void XNNPackSettings::UnPackTo(XNNPackSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3493,9 +3519,9 @@ inline bool operator!=(const CoreMLSettingsT &lhs, const CoreMLSettingsT &rhs) { + + + inline CoreMLSettingsT *CoreMLSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CoreMLSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CoreMLSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CoreMLSettings::UnPackTo(CoreMLSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3542,9 +3568,9 @@ inline bool operator!=(const EdgeTpuDeviceSpecT &lhs, const EdgeTpuDeviceSpecT & + + + inline EdgeTpuDeviceSpecT *EdgeTpuDeviceSpec::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new EdgeTpuDeviceSpecT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new EdgeTpuDeviceSpecT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void EdgeTpuDeviceSpec::UnPackTo(EdgeTpuDeviceSpecT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3589,9 +3615,9 @@ inline bool operator!=(const EdgeTpuInactivePowerConfigT &lhs, const EdgeTpuInac + + + inline EdgeTpuInactivePowerConfigT *EdgeTpuInactivePowerConfig::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new EdgeTpuInactivePowerConfigT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new EdgeTpuInactivePowerConfigT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void EdgeTpuInactivePowerConfig::UnPackTo(EdgeTpuInactivePowerConfigT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3634,19 +3660,41 @@ inline bool operator!=(const EdgeTpuSettingsT &lhs, const EdgeTpuSettingsT &rhs) + } + + ++inline EdgeTpuSettingsT::EdgeTpuSettingsT(const EdgeTpuSettingsT &o) ++ : inference_power_state(o.inference_power_state), ++ inference_priority(o.inference_priority), ++ edgetpu_device_spec((o.edgetpu_device_spec) ? new tflite::EdgeTpuDeviceSpecT(*o.edgetpu_device_spec) : nullptr), ++ model_token(o.model_token), ++ float_truncation_type(o.float_truncation_type), ++ qos_class(o.qos_class) { ++ inactive_power_configs.reserve(o.inactive_power_configs.size()); ++ for (const auto &v : o.inactive_power_configs) { inactive_power_configs.emplace_back((v) ? new tflite::EdgeTpuInactivePowerConfigT(*v) : nullptr); } ++} ++ ++inline EdgeTpuSettingsT &EdgeTpuSettingsT::operator=(EdgeTpuSettingsT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(inference_power_state, o.inference_power_state); ++ std::swap(inactive_power_configs, o.inactive_power_configs); ++ std::swap(inference_priority, o.inference_priority); ++ std::swap(edgetpu_device_spec, o.edgetpu_device_spec); ++ std::swap(model_token, o.model_token); ++ std::swap(float_truncation_type, o.float_truncation_type); ++ std::swap(qos_class, o.qos_class); ++ return *this; ++} ++ + inline EdgeTpuSettingsT *EdgeTpuSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new EdgeTpuSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new EdgeTpuSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void EdgeTpuSettings::UnPackTo(EdgeTpuSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = inference_power_state(); _o->inference_power_state = _e; } +- { auto _e = inactive_power_configs(); if (_e) { _o->inactive_power_configs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inactive_power_configs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = inactive_power_configs(); if (_e) { _o->inactive_power_configs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->inactive_power_configs[_i]) { _e->Get(_i)->UnPackTo(_o->inactive_power_configs[_i].get(), _resolver); } else { _o->inactive_power_configs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + { auto _e = inference_priority(); _o->inference_priority = _e; } +- { auto _e = edgetpu_device_spec(); if (_e) _o->edgetpu_device_spec = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = edgetpu_device_spec(); if (_e) { if(_o->edgetpu_device_spec) { _e->UnPackTo(_o->edgetpu_device_spec.get(), _resolver); } else { _o->edgetpu_device_spec = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = model_token(); if (_e) _o->model_token = _e->str(); } + { auto _e = float_truncation_type(); _o->float_truncation_type = _e; } + { auto _e = qos_class(); _o->qos_class = _e; } +@@ -3693,9 +3741,9 @@ inline bool operator!=(const CoralSettingsT &lhs, const CoralSettingsT &rhs) { + + + inline CoralSettingsT *CoralSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CoralSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CoralSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CoralSettings::UnPackTo(CoralSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3739,9 +3787,9 @@ inline bool operator!=(const CPUSettingsT &lhs, const CPUSettingsT &rhs) { + + + inline CPUSettingsT *CPUSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CPUSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CPUSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CPUSettings::UnPackTo(CPUSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3785,26 +3833,55 @@ inline bool operator!=(const TFLiteSettingsT &lhs, const TFLiteSettingsT &rhs) { + } + + ++inline TFLiteSettingsT::TFLiteSettingsT(const TFLiteSettingsT &o) ++ : delegate(o.delegate), ++ nnapi_settings((o.nnapi_settings) ? new tflite::NNAPISettingsT(*o.nnapi_settings) : nullptr), ++ gpu_settings((o.gpu_settings) ? new tflite::GPUSettingsT(*o.gpu_settings) : nullptr), ++ hexagon_settings((o.hexagon_settings) ? new tflite::HexagonSettingsT(*o.hexagon_settings) : nullptr), ++ xnnpack_settings((o.xnnpack_settings) ? new tflite::XNNPackSettingsT(*o.xnnpack_settings) : nullptr), ++ coreml_settings((o.coreml_settings) ? new tflite::CoreMLSettingsT(*o.coreml_settings) : nullptr), ++ cpu_settings((o.cpu_settings) ? new tflite::CPUSettingsT(*o.cpu_settings) : nullptr), ++ max_delegated_partitions(o.max_delegated_partitions), ++ edgetpu_settings((o.edgetpu_settings) ? new tflite::EdgeTpuSettingsT(*o.edgetpu_settings) : nullptr), ++ coral_settings((o.coral_settings) ? new tflite::CoralSettingsT(*o.coral_settings) : nullptr), ++ fallback_settings((o.fallback_settings) ? new tflite::FallbackSettingsT(*o.fallback_settings) : nullptr) { ++} ++ ++inline TFLiteSettingsT &TFLiteSettingsT::operator=(TFLiteSettingsT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(delegate, o.delegate); ++ std::swap(nnapi_settings, o.nnapi_settings); ++ std::swap(gpu_settings, o.gpu_settings); ++ std::swap(hexagon_settings, o.hexagon_settings); ++ std::swap(xnnpack_settings, o.xnnpack_settings); ++ std::swap(coreml_settings, o.coreml_settings); ++ std::swap(cpu_settings, o.cpu_settings); ++ std::swap(max_delegated_partitions, o.max_delegated_partitions); ++ std::swap(edgetpu_settings, o.edgetpu_settings); ++ std::swap(coral_settings, o.coral_settings); ++ std::swap(fallback_settings, o.fallback_settings); ++ return *this; ++} ++ + inline TFLiteSettingsT *TFLiteSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TFLiteSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TFLiteSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TFLiteSettings::UnPackTo(TFLiteSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = delegate(); _o->delegate = _e; } +- { auto _e = nnapi_settings(); if (_e) _o->nnapi_settings = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = gpu_settings(); if (_e) _o->gpu_settings = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = hexagon_settings(); if (_e) _o->hexagon_settings = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = xnnpack_settings(); if (_e) _o->xnnpack_settings = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = coreml_settings(); if (_e) _o->coreml_settings = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = cpu_settings(); if (_e) _o->cpu_settings = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = nnapi_settings(); if (_e) { if(_o->nnapi_settings) { _e->UnPackTo(_o->nnapi_settings.get(), _resolver); } else { _o->nnapi_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = gpu_settings(); if (_e) { if(_o->gpu_settings) { _e->UnPackTo(_o->gpu_settings.get(), _resolver); } else { _o->gpu_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = hexagon_settings(); if (_e) { if(_o->hexagon_settings) { _e->UnPackTo(_o->hexagon_settings.get(), _resolver); } else { _o->hexagon_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = xnnpack_settings(); if (_e) { if(_o->xnnpack_settings) { _e->UnPackTo(_o->xnnpack_settings.get(), _resolver); } else { _o->xnnpack_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = coreml_settings(); if (_e) { if(_o->coreml_settings) { _e->UnPackTo(_o->coreml_settings.get(), _resolver); } else { _o->coreml_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = cpu_settings(); if (_e) { if(_o->cpu_settings) { _e->UnPackTo(_o->cpu_settings.get(), _resolver); } else { _o->cpu_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = max_delegated_partitions(); _o->max_delegated_partitions = _e; } +- { auto _e = edgetpu_settings(); if (_e) _o->edgetpu_settings = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = coral_settings(); if (_e) _o->coral_settings = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = fallback_settings(); if (_e) _o->fallback_settings = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = edgetpu_settings(); if (_e) { if(_o->edgetpu_settings) { _e->UnPackTo(_o->edgetpu_settings.get(), _resolver); } else { _o->edgetpu_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = coral_settings(); if (_e) { if(_o->coral_settings) { _e->UnPackTo(_o->coral_settings.get(), _resolver); } else { _o->coral_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = fallback_settings(); if (_e) { if(_o->fallback_settings) { _e->UnPackTo(_o->fallback_settings.get(), _resolver); } else { _o->fallback_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset TFLiteSettings::Pack(flatbuffers::FlatBufferBuilder &_fbb, const TFLiteSettingsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3854,9 +3931,9 @@ inline bool operator!=(const FallbackSettingsT &lhs, const FallbackSettingsT &rh + + + inline FallbackSettingsT *FallbackSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FallbackSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FallbackSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void FallbackSettings::UnPackTo(FallbackSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3895,9 +3972,9 @@ inline bool operator!=(const BenchmarkMetricT &lhs, const BenchmarkMetricT &rhs) + + + inline BenchmarkMetricT *BenchmarkMetric::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BenchmarkMetricT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BenchmarkMetricT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BenchmarkMetric::UnPackTo(BenchmarkMetricT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3938,10 +4015,28 @@ inline bool operator!=(const BenchmarkResultT &lhs, const BenchmarkResultT &rhs) + } + + ++inline BenchmarkResultT::BenchmarkResultT(const BenchmarkResultT &o) ++ : initialization_time_us(o.initialization_time_us), ++ inference_time_us(o.inference_time_us), ++ max_memory_kb(o.max_memory_kb), ++ ok(o.ok) { ++ metrics.reserve(o.metrics.size()); ++ for (const auto &v : o.metrics) { metrics.emplace_back((v) ? new tflite::BenchmarkMetricT(*v) : nullptr); } ++} ++ ++inline BenchmarkResultT &BenchmarkResultT::operator=(BenchmarkResultT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(initialization_time_us, o.initialization_time_us); ++ std::swap(inference_time_us, o.inference_time_us); ++ std::swap(max_memory_kb, o.max_memory_kb); ++ std::swap(ok, o.ok); ++ std::swap(metrics, o.metrics); ++ return *this; ++} ++ + inline BenchmarkResultT *BenchmarkResult::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BenchmarkResultT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BenchmarkResultT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BenchmarkResult::UnPackTo(BenchmarkResultT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -3951,7 +4046,7 @@ inline void BenchmarkResult::UnPackTo(BenchmarkResultT *_o, const flatbuffers::r + { auto _e = inference_time_us(); if (_e) { _o->inference_time_us.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inference_time_us[_i] = _e->Get(_i); } } } + { auto _e = max_memory_kb(); _o->max_memory_kb = _e; } + { auto _e = ok(); _o->ok = _e; } +- { auto _e = metrics(); if (_e) { _o->metrics.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->metrics[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = metrics(); if (_e) { _o->metrics.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->metrics[_i]) { _e->Get(_i)->UnPackTo(_o->metrics[_i].get(), _resolver); } else { _o->metrics[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + } + + inline flatbuffers::Offset BenchmarkResult::Pack(flatbuffers::FlatBufferBuilder &_fbb, const BenchmarkResultT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -3990,9 +4085,9 @@ inline bool operator!=(const ErrorCodeT &lhs, const ErrorCodeT &rhs) { + + + inline ErrorCodeT *ErrorCode::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ErrorCodeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ErrorCodeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ErrorCode::UnPackTo(ErrorCodeT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -4036,10 +4131,28 @@ inline bool operator!=(const BenchmarkErrorT &lhs, const BenchmarkErrorT &rhs) { + } + + ++inline BenchmarkErrorT::BenchmarkErrorT(const BenchmarkErrorT &o) ++ : stage(o.stage), ++ exit_code(o.exit_code), ++ signal(o.signal), ++ mini_benchmark_error_code(o.mini_benchmark_error_code) { ++ error_code.reserve(o.error_code.size()); ++ for (const auto &v : o.error_code) { error_code.emplace_back((v) ? new tflite::ErrorCodeT(*v) : nullptr); } ++} ++ ++inline BenchmarkErrorT &BenchmarkErrorT::operator=(BenchmarkErrorT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(stage, o.stage); ++ std::swap(exit_code, o.exit_code); ++ std::swap(signal, o.signal); ++ std::swap(error_code, o.error_code); ++ std::swap(mini_benchmark_error_code, o.mini_benchmark_error_code); ++ return *this; ++} ++ + inline BenchmarkErrorT *BenchmarkError::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BenchmarkErrorT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BenchmarkErrorT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BenchmarkError::UnPackTo(BenchmarkErrorT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -4048,7 +4161,7 @@ inline void BenchmarkError::UnPackTo(BenchmarkErrorT *_o, const flatbuffers::res + { auto _e = stage(); _o->stage = _e; } + { auto _e = exit_code(); _o->exit_code = _e; } + { auto _e = signal(); _o->signal = _e; } +- { auto _e = error_code(); if (_e) { _o->error_code.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->error_code[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = error_code(); if (_e) { _o->error_code.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->error_code[_i]) { _e->Get(_i)->UnPackTo(_o->error_code[_i].get(), _resolver); } else { _o->error_code[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + { auto _e = mini_benchmark_error_code(); _o->mini_benchmark_error_code = _e; } + } + +@@ -4090,19 +4203,38 @@ inline bool operator!=(const BenchmarkEventT &lhs, const BenchmarkEventT &rhs) { + } + + ++inline BenchmarkEventT::BenchmarkEventT(const BenchmarkEventT &o) ++ : tflite_settings((o.tflite_settings) ? new tflite::TFLiteSettingsT(*o.tflite_settings) : nullptr), ++ event_type(o.event_type), ++ result((o.result) ? new tflite::BenchmarkResultT(*o.result) : nullptr), ++ error((o.error) ? new tflite::BenchmarkErrorT(*o.error) : nullptr), ++ boottime_us(o.boottime_us), ++ wallclock_us(o.wallclock_us) { ++} ++ ++inline BenchmarkEventT &BenchmarkEventT::operator=(BenchmarkEventT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(tflite_settings, o.tflite_settings); ++ std::swap(event_type, o.event_type); ++ std::swap(result, o.result); ++ std::swap(error, o.error); ++ std::swap(boottime_us, o.boottime_us); ++ std::swap(wallclock_us, o.wallclock_us); ++ return *this; ++} ++ + inline BenchmarkEventT *BenchmarkEvent::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BenchmarkEventT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BenchmarkEventT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BenchmarkEvent::UnPackTo(BenchmarkEventT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = tflite_settings(); if (_e) _o->tflite_settings = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = tflite_settings(); if (_e) { if(_o->tflite_settings) { _e->UnPackTo(_o->tflite_settings.get(), _resolver); } else { _o->tflite_settings = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = event_type(); _o->event_type = _e; } +- { auto _e = result(); if (_e) _o->result = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = error(); if (_e) _o->error = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = result(); if (_e) { if(_o->result) { _e->UnPackTo(_o->result.get(), _resolver); } else { _o->result = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = error(); if (_e) { if(_o->error) { _e->UnPackTo(_o->error.get(), _resolver); } else { _o->error = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = boottime_us(); _o->boottime_us = _e; } + { auto _e = wallclock_us(); _o->wallclock_us = _e; } + } +@@ -4144,17 +4276,30 @@ inline bool operator!=(const BestAccelerationDecisionT &lhs, const BestAccelerat + } + + ++inline BestAccelerationDecisionT::BestAccelerationDecisionT(const BestAccelerationDecisionT &o) ++ : number_of_source_events(o.number_of_source_events), ++ min_latency_event((o.min_latency_event) ? new tflite::BenchmarkEventT(*o.min_latency_event) : nullptr), ++ min_inference_time_us(o.min_inference_time_us) { ++} ++ ++inline BestAccelerationDecisionT &BestAccelerationDecisionT::operator=(BestAccelerationDecisionT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(number_of_source_events, o.number_of_source_events); ++ std::swap(min_latency_event, o.min_latency_event); ++ std::swap(min_inference_time_us, o.min_inference_time_us); ++ return *this; ++} ++ + inline BestAccelerationDecisionT *BestAccelerationDecision::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BestAccelerationDecisionT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BestAccelerationDecisionT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BestAccelerationDecision::UnPackTo(BestAccelerationDecisionT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = number_of_source_events(); _o->number_of_source_events = _e; } +- { auto _e = min_latency_event(); if (_e) _o->min_latency_event = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = min_latency_event(); if (_e) { if(_o->min_latency_event) { _e->UnPackTo(_o->min_latency_event.get(), _resolver); } else { _o->min_latency_event = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = min_inference_time_us(); _o->min_inference_time_us = _e; } + } + +@@ -4188,9 +4333,9 @@ inline bool operator!=(const BenchmarkInitializationFailureT &lhs, const Benchma + + + inline BenchmarkInitializationFailureT *BenchmarkInitializationFailure::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BenchmarkInitializationFailureT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BenchmarkInitializationFailureT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BenchmarkInitializationFailure::UnPackTo(BenchmarkInitializationFailureT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -4227,19 +4372,34 @@ inline bool operator!=(const MiniBenchmarkEventT &lhs, const MiniBenchmarkEventT + } + + ++inline MiniBenchmarkEventT::MiniBenchmarkEventT(const MiniBenchmarkEventT &o) ++ : is_log_flushing_event(o.is_log_flushing_event), ++ best_acceleration_decision((o.best_acceleration_decision) ? new tflite::BestAccelerationDecisionT(*o.best_acceleration_decision) : nullptr), ++ initialization_failure((o.initialization_failure) ? new tflite::BenchmarkInitializationFailureT(*o.initialization_failure) : nullptr), ++ benchmark_event((o.benchmark_event) ? new tflite::BenchmarkEventT(*o.benchmark_event) : nullptr) { ++} ++ ++inline MiniBenchmarkEventT &MiniBenchmarkEventT::operator=(MiniBenchmarkEventT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(is_log_flushing_event, o.is_log_flushing_event); ++ std::swap(best_acceleration_decision, o.best_acceleration_decision); ++ std::swap(initialization_failure, o.initialization_failure); ++ std::swap(benchmark_event, o.benchmark_event); ++ return *this; ++} ++ + inline MiniBenchmarkEventT *MiniBenchmarkEvent::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MiniBenchmarkEventT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MiniBenchmarkEventT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MiniBenchmarkEvent::UnPackTo(MiniBenchmarkEventT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = is_log_flushing_event(); _o->is_log_flushing_event = _e; } +- { auto _e = best_acceleration_decision(); if (_e) _o->best_acceleration_decision = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = initialization_failure(); if (_e) _o->initialization_failure = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = benchmark_event(); if (_e) _o->benchmark_event = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = best_acceleration_decision(); if (_e) { if(_o->best_acceleration_decision) { _e->UnPackTo(_o->best_acceleration_decision.get(), _resolver); } else { _o->best_acceleration_decision = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = initialization_failure(); if (_e) { if(_o->initialization_failure) { _e->UnPackTo(_o->initialization_failure.get(), _resolver); } else { _o->initialization_failure = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = benchmark_event(); if (_e) { if(_o->benchmark_event) { _e->UnPackTo(_o->benchmark_event.get(), _resolver); } else { _o->benchmark_event = std::unique_ptr(_e->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset MiniBenchmarkEvent::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MiniBenchmarkEventT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4277,9 +4437,9 @@ inline bool operator!=(const ModelFileT &lhs, const ModelFileT &rhs) { + + + inline ModelFileT *ModelFile::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ModelFileT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ModelFileT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ModelFile::UnPackTo(ModelFileT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -4324,9 +4484,9 @@ inline bool operator!=(const BenchmarkStoragePathsT &lhs, const BenchmarkStorage + + + inline BenchmarkStoragePathsT *BenchmarkStoragePaths::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BenchmarkStoragePathsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BenchmarkStoragePathsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BenchmarkStoragePaths::UnPackTo(BenchmarkStoragePathsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -4365,18 +4525,32 @@ inline bool operator!=(const MinibenchmarkSettingsT &lhs, const MinibenchmarkSet + } + + ++inline MinibenchmarkSettingsT::MinibenchmarkSettingsT(const MinibenchmarkSettingsT &o) ++ : model_file((o.model_file) ? new tflite::ModelFileT(*o.model_file) : nullptr), ++ storage_paths((o.storage_paths) ? new tflite::BenchmarkStoragePathsT(*o.storage_paths) : nullptr) { ++ settings_to_test.reserve(o.settings_to_test.size()); ++ for (const auto &v : o.settings_to_test) { settings_to_test.emplace_back((v) ? new tflite::TFLiteSettingsT(*v) : nullptr); } ++} ++ ++inline MinibenchmarkSettingsT &MinibenchmarkSettingsT::operator=(MinibenchmarkSettingsT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(settings_to_test, o.settings_to_test); ++ std::swap(model_file, o.model_file); ++ std::swap(storage_paths, o.storage_paths); ++ return *this; ++} ++ + inline MinibenchmarkSettingsT *MinibenchmarkSettings::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MinibenchmarkSettingsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MinibenchmarkSettingsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MinibenchmarkSettings::UnPackTo(MinibenchmarkSettingsT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = settings_to_test(); if (_e) { _o->settings_to_test.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->settings_to_test[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } +- { auto _e = model_file(); if (_e) _o->model_file = std::unique_ptr(_e->UnPack(_resolver)); } +- { auto _e = storage_paths(); if (_e) _o->storage_paths = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = settings_to_test(); if (_e) { _o->settings_to_test.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->settings_to_test[_i]) { _e->Get(_i)->UnPackTo(_o->settings_to_test[_i].get(), _resolver); } else { _o->settings_to_test[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } ++ { auto _e = model_file(); if (_e) { if(_o->model_file) { _e->UnPackTo(_o->model_file.get(), _resolver); } else { _o->model_file = std::unique_ptr(_e->UnPack(_resolver)); } } } ++ { auto _e = storage_paths(); if (_e) { if(_o->storage_paths) { _e->UnPackTo(_o->storage_paths.get(), _resolver); } else { _o->storage_paths = std::unique_ptr(_e->UnPack(_resolver)); } } } + } + + inline flatbuffers::Offset MinibenchmarkSettings::Pack(flatbuffers::FlatBufferBuilder &_fbb, const MinibenchmarkSettingsT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -4399,4 +4573,4 @@ inline flatbuffers::Offset CreateMinibenchmarkSettings(fl + + } // namespace tflite + +-#endif // FLATBUFFERS_GENERATED_CONFIGURATIONFORGENERATION_TFLITE_H_ ++#endif // FLATBUFFERS_GENERATED_CONFIGURATION_TFLITE_H_ +diff --git a/tensorflow/lite/schema/schema_generated.h b/tensorflow/lite/schema/schema_generated.h +index 0de55f064ef..886eddaeaac 100755 +--- a/tensorflow/lite/schema/schema_generated.h ++++ b/tensorflow/lite/schema/schema_generated.h +@@ -4023,10 +4023,10 @@ struct QuantizationParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab + verifier.VerifyVector(scale()) && + VerifyOffset(verifier, VT_ZERO_POINT) && + verifier.VerifyVector(zero_point()) && +- VerifyField(verifier, VT_DETAILS_TYPE) && ++ VerifyField(verifier, VT_DETAILS_TYPE, 1) && + VerifyOffset(verifier, VT_DETAILS) && + VerifyQuantizationDetails(verifier, details(), details_type()) && +- VerifyField(verifier, VT_QUANTIZED_DIMENSION) && ++ VerifyField(verifier, VT_QUANTIZED_DIMENSION, 4) && + verifier.EndTable(); + } + QuantizationParametersT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -4367,12 +4367,12 @@ struct DimensionMetadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FORMAT) && +- VerifyField(verifier, VT_DENSE_SIZE) && +- VerifyField(verifier, VT_ARRAY_SEGMENTS_TYPE) && ++ VerifyField(verifier, VT_FORMAT, 1) && ++ VerifyField(verifier, VT_DENSE_SIZE, 4) && ++ VerifyField(verifier, VT_ARRAY_SEGMENTS_TYPE, 1) && + VerifyOffset(verifier, VT_ARRAY_SEGMENTS) && + VerifySparseIndexVector(verifier, array_segments(), array_segments_type()) && +- VerifyField(verifier, VT_ARRAY_INDICES_TYPE) && ++ VerifyField(verifier, VT_ARRAY_INDICES_TYPE, 1) && + VerifyOffset(verifier, VT_ARRAY_INDICES) && + VerifySparseIndexVector(verifier, array_indices(), array_indices_type()) && + verifier.EndTable(); +@@ -4464,6 +4464,10 @@ struct SparsityParametersT : public flatbuffers::NativeTable { + std::vector traversal_order{}; + std::vector block_map{}; + std::vector> dim_metadata{}; ++ SparsityParametersT() = default; ++ SparsityParametersT(const SparsityParametersT &o); ++ SparsityParametersT(SparsityParametersT&&) FLATBUFFERS_NOEXCEPT = default; ++ SparsityParametersT &operator=(SparsityParametersT o) FLATBUFFERS_NOEXCEPT; + }; + + struct SparsityParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -4562,6 +4566,10 @@ struct TensorT : public flatbuffers::NativeTable { + bool is_variable = false; + std::unique_ptr sparsity{}; + std::vector shape_signature{}; ++ TensorT() = default; ++ TensorT(const TensorT &o); ++ TensorT(TensorT&&) FLATBUFFERS_NOEXCEPT = default; ++ TensorT &operator=(TensorT o) FLATBUFFERS_NOEXCEPT; + }; + + struct Tensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -4605,13 +4613,13 @@ struct Tensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_SHAPE) && + verifier.VerifyVector(shape()) && +- VerifyField(verifier, VT_TYPE) && +- VerifyField(verifier, VT_BUFFER) && ++ VerifyField(verifier, VT_TYPE, 1) && ++ VerifyField(verifier, VT_BUFFER, 4) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && + VerifyOffset(verifier, VT_QUANTIZATION) && + verifier.VerifyTable(quantization()) && +- VerifyField(verifier, VT_IS_VARIABLE) && ++ VerifyField(verifier, VT_IS_VARIABLE, 1) && + VerifyOffset(verifier, VT_SPARSITY) && + verifier.VerifyTable(sparsity()) && + VerifyOffset(verifier, VT_SHAPE_SIGNATURE) && +@@ -4752,12 +4760,12 @@ struct Conv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PADDING) && +- VerifyField(verifier, VT_STRIDE_W) && +- VerifyField(verifier, VT_STRIDE_H) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_DILATION_W_FACTOR) && +- VerifyField(verifier, VT_DILATION_H_FACTOR) && ++ VerifyField(verifier, VT_PADDING, 1) && ++ VerifyField(verifier, VT_STRIDE_W, 4) && ++ VerifyField(verifier, VT_STRIDE_H, 4) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_DILATION_W_FACTOR, 4) && ++ VerifyField(verifier, VT_DILATION_H_FACTOR, 4) && + verifier.EndTable(); + } + Conv2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -4869,14 +4877,14 @@ struct Conv3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PADDING) && +- VerifyField(verifier, VT_STRIDE_D) && +- VerifyField(verifier, VT_STRIDE_W) && +- VerifyField(verifier, VT_STRIDE_H) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_DILATION_D_FACTOR) && +- VerifyField(verifier, VT_DILATION_W_FACTOR) && +- VerifyField(verifier, VT_DILATION_H_FACTOR) && ++ VerifyField(verifier, VT_PADDING, 1) && ++ VerifyField(verifier, VT_STRIDE_D, 4) && ++ VerifyField(verifier, VT_STRIDE_W, 4) && ++ VerifyField(verifier, VT_STRIDE_H, 4) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_DILATION_D_FACTOR, 4) && ++ VerifyField(verifier, VT_DILATION_W_FACTOR, 4) && ++ VerifyField(verifier, VT_DILATION_H_FACTOR, 4) && + verifier.EndTable(); + } + Conv3DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -4988,12 +4996,12 @@ struct Pool2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PADDING) && +- VerifyField(verifier, VT_STRIDE_W) && +- VerifyField(verifier, VT_STRIDE_H) && +- VerifyField(verifier, VT_FILTER_WIDTH) && +- VerifyField(verifier, VT_FILTER_HEIGHT) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && ++ VerifyField(verifier, VT_PADDING, 1) && ++ VerifyField(verifier, VT_STRIDE_W, 4) && ++ VerifyField(verifier, VT_STRIDE_H, 4) && ++ VerifyField(verifier, VT_FILTER_WIDTH, 4) && ++ VerifyField(verifier, VT_FILTER_HEIGHT, 4) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && + verifier.EndTable(); + } + Pool2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5100,13 +5108,13 @@ struct DepthwiseConv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PADDING) && +- VerifyField(verifier, VT_STRIDE_W) && +- VerifyField(verifier, VT_STRIDE_H) && +- VerifyField(verifier, VT_DEPTH_MULTIPLIER) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_DILATION_W_FACTOR) && +- VerifyField(verifier, VT_DILATION_H_FACTOR) && ++ VerifyField(verifier, VT_PADDING, 1) && ++ VerifyField(verifier, VT_STRIDE_W, 4) && ++ VerifyField(verifier, VT_STRIDE_H, 4) && ++ VerifyField(verifier, VT_DEPTH_MULTIPLIER, 4) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_DILATION_W_FACTOR, 4) && ++ VerifyField(verifier, VT_DILATION_H_FACTOR, 4) && + verifier.EndTable(); + } + DepthwiseConv2DOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5198,7 +5206,7 @@ struct ConcatEmbeddingsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Ta + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NUM_CHANNELS) && ++ VerifyField(verifier, VT_NUM_CHANNELS, 4) && + VerifyOffset(verifier, VT_NUM_COLUMNS_PER_CHANNEL) && + verifier.VerifyVector(num_columns_per_channel()) && + VerifyOffset(verifier, VT_EMBEDDING_DIM_PER_CHANNEL) && +@@ -5278,7 +5286,7 @@ struct LSHProjectionOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_TYPE) && ++ VerifyField(verifier, VT_TYPE, 1) && + verifier.EndTable(); + } + LSHProjectionOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5340,9 +5348,9 @@ struct SVDFOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_RANK) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_RANK, 4) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + SVDFOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5409,8 +5417,8 @@ struct RNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + RNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5477,9 +5485,9 @@ struct SequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_TIME_MAJOR) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_TIME_MAJOR, 1) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + SequenceRNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5556,10 +5564,10 @@ struct BidirectionalSequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuf + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_TIME_MAJOR) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_MERGE_OUTPUTS) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_TIME_MAJOR, 1) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_MERGE_OUTPUTS, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + BidirectionalSequenceRNNOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5641,10 +5649,10 @@ struct FullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_WEIGHTS_FORMAT) && +- VerifyField(verifier, VT_KEEP_NUM_DIMS) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_WEIGHTS_FORMAT, 1) && ++ VerifyField(verifier, VT_KEEP_NUM_DIMS, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + FullyConnectedOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5711,7 +5719,7 @@ struct SoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_BETA) && ++ VerifyField(verifier, VT_BETA, 4) && + verifier.EndTable(); + } + SoftmaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5768,8 +5776,8 @@ struct ConcatenationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_AXIS) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && ++ VerifyField(verifier, VT_AXIS, 4) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && + verifier.EndTable(); + } + ConcatenationOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5831,8 +5839,8 @@ struct AddOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_POT_SCALE_INT16) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_POT_SCALE_INT16, 1) && + verifier.EndTable(); + } + AddOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5889,7 +5897,7 @@ struct MulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && + verifier.EndTable(); + } + MulOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -5941,7 +5949,7 @@ struct L2NormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && + verifier.EndTable(); + } + L2NormOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6008,10 +6016,10 @@ struct LocalResponseNormalizationOptions FLATBUFFERS_FINAL_CLASS : private flatb + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_RADIUS) && +- VerifyField(verifier, VT_BIAS) && +- VerifyField(verifier, VT_ALPHA) && +- VerifyField(verifier, VT_BETA) && ++ VerifyField(verifier, VT_RADIUS, 4) && ++ VerifyField(verifier, VT_BIAS, 4) && ++ VerifyField(verifier, VT_ALPHA, 4) && ++ VerifyField(verifier, VT_BETA, 4) && + verifier.EndTable(); + } + LocalResponseNormalizationOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6098,11 +6106,11 @@ struct LSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_CELL_CLIP) && +- VerifyField(verifier, VT_PROJ_CLIP) && +- VerifyField(verifier, VT_KERNEL_TYPE) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_CELL_CLIP, 4) && ++ VerifyField(verifier, VT_PROJ_CLIP, 4) && ++ VerifyField(verifier, VT_KERNEL_TYPE, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + LSTMOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6194,11 +6202,11 @@ struct UnidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatb + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_CELL_CLIP) && +- VerifyField(verifier, VT_PROJ_CLIP) && +- VerifyField(verifier, VT_TIME_MAJOR) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_CELL_CLIP, 4) && ++ VerifyField(verifier, VT_PROJ_CLIP, 4) && ++ VerifyField(verifier, VT_TIME_MAJOR, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + UnidirectionalSequenceLSTMOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6295,12 +6303,12 @@ struct BidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbu + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_CELL_CLIP) && +- VerifyField(verifier, VT_PROJ_CLIP) && +- VerifyField(verifier, VT_MERGE_OUTPUTS) && +- VerifyField(verifier, VT_TIME_MAJOR) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_CELL_CLIP, 4) && ++ VerifyField(verifier, VT_PROJ_CLIP, 4) && ++ VerifyField(verifier, VT_MERGE_OUTPUTS, 1) && ++ VerifyField(verifier, VT_TIME_MAJOR, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + BidirectionalSequenceLSTMOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6382,8 +6390,8 @@ struct ResizeBilinearOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_ALIGN_CORNERS) && +- VerifyField(verifier, VT_HALF_PIXEL_CENTERS) && ++ VerifyField(verifier, VT_ALIGN_CORNERS, 1) && ++ VerifyField(verifier, VT_HALF_PIXEL_CENTERS, 1) && + verifier.EndTable(); + } + ResizeBilinearOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6445,8 +6453,8 @@ struct ResizeNearestNeighborOptions FLATBUFFERS_FINAL_CLASS : private flatbuffer + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_ALIGN_CORNERS) && +- VerifyField(verifier, VT_HALF_PIXEL_CENTERS) && ++ VerifyField(verifier, VT_ALIGN_CORNERS, 1) && ++ VerifyField(verifier, VT_HALF_PIXEL_CENTERS, 1) && + verifier.EndTable(); + } + ResizeNearestNeighborOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6503,7 +6511,7 @@ struct CallOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_SUBGRAPH) && ++ VerifyField(verifier, VT_SUBGRAPH, 4) && + verifier.EndTable(); + } + CallOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6783,9 +6791,9 @@ struct SkipGramOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NGRAM_SIZE) && +- VerifyField(verifier, VT_MAX_SKIP_SIZE) && +- VerifyField(verifier, VT_INCLUDE_ALL_NGRAMS) && ++ VerifyField(verifier, VT_NGRAM_SIZE, 4) && ++ VerifyField(verifier, VT_MAX_SKIP_SIZE, 4) && ++ VerifyField(verifier, VT_INCLUDE_ALL_NGRAMS, 1) && + verifier.EndTable(); + } + SkipGramOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6847,7 +6855,7 @@ struct SpaceToDepthOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_BLOCK_SIZE) && ++ VerifyField(verifier, VT_BLOCK_SIZE, 4) && + verifier.EndTable(); + } + SpaceToDepthOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6899,7 +6907,7 @@ struct DepthToSpaceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_BLOCK_SIZE) && ++ VerifyField(verifier, VT_BLOCK_SIZE, 4) && + verifier.EndTable(); + } + DepthToSpaceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -6956,8 +6964,8 @@ struct SubOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && +- VerifyField(verifier, VT_POT_SCALE_INT16) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && ++ VerifyField(verifier, VT_POT_SCALE_INT16, 1) && + verifier.EndTable(); + } + SubOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7014,7 +7022,7 @@ struct DivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION) && ++ VerifyField(verifier, VT_FUSED_ACTIVATION_FUNCTION, 1) && + verifier.EndTable(); + } + DivOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7105,7 +7113,7 @@ struct EmbeddingLookupSparseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffer + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_COMBINER) && ++ VerifyField(verifier, VT_COMBINER, 1) && + verifier.EndTable(); + } + EmbeddingLookupSparseOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7162,8 +7170,8 @@ struct GatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_AXIS) && +- VerifyField(verifier, VT_BATCH_DIMS) && ++ VerifyField(verifier, VT_AXIS, 4) && ++ VerifyField(verifier, VT_BATCH_DIMS, 4) && + verifier.EndTable(); + } + GatherOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7337,7 +7345,7 @@ struct ReducerOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_KEEP_DIMS) && ++ VerifyField(verifier, VT_KEEP_DIMS, 1) && + verifier.EndTable(); + } + ReducerOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7451,7 +7459,7 @@ struct SplitOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NUM_SPLITS) && ++ VerifyField(verifier, VT_NUM_SPLITS, 4) && + verifier.EndTable(); + } + SplitOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7503,7 +7511,7 @@ struct SplitVOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NUM_SPLITS) && ++ VerifyField(verifier, VT_NUM_SPLITS, 4) && + verifier.EndTable(); + } + SplitVOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7575,11 +7583,11 @@ struct StridedSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_BEGIN_MASK) && +- VerifyField(verifier, VT_END_MASK) && +- VerifyField(verifier, VT_ELLIPSIS_MASK) && +- VerifyField(verifier, VT_NEW_AXIS_MASK) && +- VerifyField(verifier, VT_SHRINK_AXIS_MASK) && ++ VerifyField(verifier, VT_BEGIN_MASK, 4) && ++ VerifyField(verifier, VT_END_MASK, 4) && ++ VerifyField(verifier, VT_ELLIPSIS_MASK, 4) && ++ VerifyField(verifier, VT_NEW_AXIS_MASK, 4) && ++ VerifyField(verifier, VT_SHRINK_AXIS_MASK, 4) && + verifier.EndTable(); + } + StridedSliceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7695,8 +7703,8 @@ struct CastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_IN_DATA_TYPE) && +- VerifyField(verifier, VT_OUT_DATA_TYPE) && ++ VerifyField(verifier, VT_IN_DATA_TYPE, 1) && ++ VerifyField(verifier, VT_OUT_DATA_TYPE, 1) && + verifier.EndTable(); + } + CastOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7870,7 +7878,7 @@ struct ArgMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_OUTPUT_TYPE) && ++ VerifyField(verifier, VT_OUTPUT_TYPE, 1) && + verifier.EndTable(); + } + ArgMaxOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -7922,7 +7930,7 @@ struct ArgMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_OUTPUT_TYPE) && ++ VerifyField(verifier, VT_OUTPUT_TYPE, 1) && + verifier.EndTable(); + } + ArgMinOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -8257,9 +8265,9 @@ struct TransposeConvOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_PADDING) && +- VerifyField(verifier, VT_STRIDE_W) && +- VerifyField(verifier, VT_STRIDE_H) && ++ VerifyField(verifier, VT_PADDING, 1) && ++ VerifyField(verifier, VT_STRIDE_W, 4) && ++ VerifyField(verifier, VT_STRIDE_H, 4) && + verifier.EndTable(); + } + TransposeConvOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -8360,7 +8368,7 @@ struct SparseToDenseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_VALIDATE_INDICES) && ++ VerifyField(verifier, VT_VALIDATE_INDICES, 1) && + verifier.EndTable(); + } + SparseToDenseOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -8490,7 +8498,7 @@ struct ShapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_OUT_TYPE) && ++ VerifyField(verifier, VT_OUT_TYPE, 1) && + verifier.EndTable(); + } + ShapeOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -8635,10 +8643,10 @@ struct FakeQuantOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_MIN) && +- VerifyField(verifier, VT_MAX) && +- VerifyField(verifier, VT_NUM_BITS) && +- VerifyField(verifier, VT_NARROW_RANGE) && ++ VerifyField(verifier, VT_MIN, 4) && ++ VerifyField(verifier, VT_MAX, 4) && ++ VerifyField(verifier, VT_NUM_BITS, 4) && ++ VerifyField(verifier, VT_NARROW_RANGE, 1) && + verifier.EndTable(); + } + FakeQuantOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -8710,8 +8718,8 @@ struct PackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_VALUES_COUNT) && +- VerifyField(verifier, VT_AXIS) && ++ VerifyField(verifier, VT_VALUES_COUNT, 4) && ++ VerifyField(verifier, VT_AXIS, 4) && + verifier.EndTable(); + } + PackOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -8807,7 +8815,7 @@ struct OneHotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_AXIS) && ++ VerifyField(verifier, VT_AXIS, 4) && + verifier.EndTable(); + } + OneHotOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9020,8 +9028,8 @@ struct UnpackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_NUM) && +- VerifyField(verifier, VT_AXIS) && ++ VerifyField(verifier, VT_NUM, 4) && ++ VerifyField(verifier, VT_AXIS, 4) && + verifier.EndTable(); + } + UnpackOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9312,7 +9320,7 @@ struct LeakyReluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_ALPHA) && ++ VerifyField(verifier, VT_ALPHA, 4) && + verifier.EndTable(); + } + LeakyReluOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9403,7 +9411,7 @@ struct MirrorPadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_MODE) && ++ VerifyField(verifier, VT_MODE, 1) && + verifier.EndTable(); + } + MirrorPadOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9455,7 +9463,7 @@ struct UniqueOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_IDX_OUT_TYPE) && ++ VerifyField(verifier, VT_IDX_OUT_TYPE, 1) && + verifier.EndTable(); + } + UniqueOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9668,8 +9676,8 @@ struct ReverseSequenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_SEQ_DIM) && +- VerifyField(verifier, VT_BATCH_DIM) && ++ VerifyField(verifier, VT_SEQ_DIM, 4) && ++ VerifyField(verifier, VT_BATCH_DIM, 4) && + verifier.EndTable(); + } + ReverseSequenceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9848,8 +9856,8 @@ struct IfOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_THEN_SUBGRAPH_INDEX) && +- VerifyField(verifier, VT_ELSE_SUBGRAPH_INDEX) && ++ VerifyField(verifier, VT_THEN_SUBGRAPH_INDEX, 4) && ++ VerifyField(verifier, VT_ELSE_SUBGRAPH_INDEX, 4) && + verifier.EndTable(); + } + IfOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9906,7 +9914,7 @@ struct CallOnceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_INIT_SUBGRAPH_INDEX) && ++ VerifyField(verifier, VT_INIT_SUBGRAPH_INDEX, 4) && + verifier.EndTable(); + } + CallOnceOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -9963,8 +9971,8 @@ struct WhileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_COND_SUBGRAPH_INDEX) && +- VerifyField(verifier, VT_BODY_SUBGRAPH_INDEX) && ++ VerifyField(verifier, VT_COND_SUBGRAPH_INDEX, 4) && ++ VerifyField(verifier, VT_BODY_SUBGRAPH_INDEX, 4) && + verifier.EndTable(); + } + WhileOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -10265,9 +10273,9 @@ struct BatchMatMulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_ADJ_X) && +- VerifyField(verifier, VT_ADJ_Y) && +- VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS) && ++ VerifyField(verifier, VT_ADJ_X, 1) && ++ VerifyField(verifier, VT_ADJ_Y, 1) && ++ VerifyField(verifier, VT_ASYMMETRIC_QUANTIZE_INPUTS, 1) && + verifier.EndTable(); + } + BatchMatMulOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -10334,8 +10342,8 @@ struct CumsumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_EXCLUSIVE) && +- VerifyField(verifier, VT_REVERSE) && ++ VerifyField(verifier, VT_EXCLUSIVE, 1) && ++ VerifyField(verifier, VT_REVERSE, 1) && + verifier.EndTable(); + } + CumsumOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -10480,9 +10488,9 @@ struct HashtableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_TABLE_ID) && +- VerifyField(verifier, VT_KEY_DTYPE) && +- VerifyField(verifier, VT_VALUE_DTYPE) && ++ VerifyField(verifier, VT_TABLE_ID, 4) && ++ VerifyField(verifier, VT_KEY_DTYPE, 1) && ++ VerifyField(verifier, VT_VALUE_DTYPE, 1) && + verifier.EndTable(); + } + HashtableOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -10821,8 +10829,8 @@ struct RandomOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_SEED) && +- VerifyField(verifier, VT_SEED2) && ++ VerifyField(verifier, VT_SEED, 8) && ++ VerifyField(verifier, VT_SEED2, 8) && + verifier.EndTable(); + } + RandomOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -10941,7 +10949,7 @@ struct GeluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_APPROXIMATE) && ++ VerifyField(verifier, VT_APPROXIMATE, 1) && + verifier.EndTable(); + } + GeluOptionsT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -11047,11 +11055,11 @@ struct OperatorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_DEPRECATED_BUILTIN_CODE) && ++ VerifyField(verifier, VT_DEPRECATED_BUILTIN_CODE, 1) && + VerifyOffset(verifier, VT_CUSTOM_CODE) && + verifier.VerifyString(custom_code()) && +- VerifyField(verifier, VT_VERSION) && +- VerifyField(verifier, VT_BUILTIN_CODE) && ++ VerifyField(verifier, VT_VERSION, 4) && ++ VerifyField(verifier, VT_BUILTIN_CODE, 4) && + verifier.EndTable(); + } + OperatorCodeT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -11524,17 +11532,17 @@ struct Operator FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_OPCODE_INDEX) && ++ VerifyField(verifier, VT_OPCODE_INDEX, 4) && + VerifyOffset(verifier, VT_INPUTS) && + verifier.VerifyVector(inputs()) && + VerifyOffset(verifier, VT_OUTPUTS) && + verifier.VerifyVector(outputs()) && +- VerifyField(verifier, VT_BUILTIN_OPTIONS_TYPE) && ++ VerifyField(verifier, VT_BUILTIN_OPTIONS_TYPE, 1) && + VerifyOffset(verifier, VT_BUILTIN_OPTIONS) && + VerifyBuiltinOptions(verifier, builtin_options(), builtin_options_type()) && + VerifyOffset(verifier, VT_CUSTOM_OPTIONS) && + verifier.VerifyVector(custom_options()) && +- VerifyField(verifier, VT_CUSTOM_OPTIONS_FORMAT) && ++ VerifyField(verifier, VT_CUSTOM_OPTIONS_FORMAT, 1) && + VerifyOffset(verifier, VT_MUTATING_VARIABLE_INPUTS) && + verifier.VerifyVector(mutating_variable_inputs()) && + VerifyOffset(verifier, VT_INTERMEDIATES) && +@@ -12118,6 +12126,10 @@ struct SubGraphT : public flatbuffers::NativeTable { + std::vector outputs{}; + std::vector> operators{}; + std::string name{}; ++ SubGraphT() = default; ++ SubGraphT(const SubGraphT &o); ++ SubGraphT(SubGraphT&&) FLATBUFFERS_NOEXCEPT = default; ++ SubGraphT &operator=(SubGraphT o) FLATBUFFERS_NOEXCEPT; + }; + + struct SubGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -12321,7 +12333,7 @@ struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && +- VerifyField(verifier, VT_BUFFER) && ++ VerifyField(verifier, VT_BUFFER, 4) && + verifier.EndTable(); + } + MetadataT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -12396,7 +12408,7 @@ struct TensorMap FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + return VerifyTableStart(verifier) && + VerifyOffset(verifier, VT_NAME) && + verifier.VerifyString(name()) && +- VerifyField(verifier, VT_TENSOR_INDEX) && ++ VerifyField(verifier, VT_TENSOR_INDEX, 4) && + verifier.EndTable(); + } + TensorMapT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -12454,6 +12466,10 @@ struct SignatureDefT : public flatbuffers::NativeTable { + std::vector> outputs{}; + std::string signature_key{}; + uint32_t subgraph_index = 0; ++ SignatureDefT() = default; ++ SignatureDefT(const SignatureDefT &o); ++ SignatureDefT(SignatureDefT&&) FLATBUFFERS_NOEXCEPT = default; ++ SignatureDefT &operator=(SignatureDefT o) FLATBUFFERS_NOEXCEPT; + }; + + struct SignatureDef FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -12487,7 +12503,7 @@ struct SignatureDef FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + verifier.VerifyVectorOfTables(outputs()) && + VerifyOffset(verifier, VT_SIGNATURE_KEY) && + verifier.VerifyString(signature_key()) && +- VerifyField(verifier, VT_SUBGRAPH_INDEX) && ++ VerifyField(verifier, VT_SUBGRAPH_INDEX, 4) && + verifier.EndTable(); + } + SignatureDefT *UnPack(const flatbuffers::resolver_function_t *_resolver = nullptr) const; +@@ -12565,6 +12581,10 @@ struct ModelT : public flatbuffers::NativeTable { + std::vector metadata_buffer{}; + std::vector> metadata{}; + std::vector> signature_defs{}; ++ ModelT() = default; ++ ModelT(const ModelT &o); ++ ModelT(ModelT&&) FLATBUFFERS_NOEXCEPT = default; ++ ModelT &operator=(ModelT o) FLATBUFFERS_NOEXCEPT; + }; + + struct Model FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { +@@ -12606,7 +12626,7 @@ struct Model FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + } + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && +- VerifyField(verifier, VT_VERSION) && ++ VerifyField(verifier, VT_VERSION, 4) && + VerifyOffset(verifier, VT_OPERATOR_CODES) && + verifier.VerifyVector(operator_codes()) && + verifier.VerifyVectorOfTables(operator_codes()) && +@@ -12917,6 +12937,20 @@ inline flatbuffers::Offset CreateDimensionMetadata(flatbuffer + _array_indices); + } + ++inline SparsityParametersT::SparsityParametersT(const SparsityParametersT &o) ++ : traversal_order(o.traversal_order), ++ block_map(o.block_map) { ++ dim_metadata.reserve(o.dim_metadata.size()); ++ for (const auto &v : o.dim_metadata) { dim_metadata.emplace_back((v) ? new tflite::DimensionMetadataT(*v) : nullptr); } ++} ++ ++inline SparsityParametersT &SparsityParametersT::operator=(SparsityParametersT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(traversal_order, o.traversal_order); ++ std::swap(block_map, o.block_map); ++ std::swap(dim_metadata, o.dim_metadata); ++ return *this; ++} ++ + inline SparsityParametersT *SparsityParameters::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new SparsityParametersT()); + UnPackTo(_o.get(), _resolver); +@@ -12949,6 +12983,29 @@ inline flatbuffers::Offset CreateSparsityParameters(flatbuff + _dim_metadata); + } + ++inline TensorT::TensorT(const TensorT &o) ++ : shape(o.shape), ++ type(o.type), ++ buffer(o.buffer), ++ name(o.name), ++ quantization((o.quantization) ? new tflite::QuantizationParametersT(*o.quantization) : nullptr), ++ is_variable(o.is_variable), ++ sparsity((o.sparsity) ? new tflite::SparsityParametersT(*o.sparsity) : nullptr), ++ shape_signature(o.shape_signature) { ++} ++ ++inline TensorT &TensorT::operator=(TensorT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(shape, o.shape); ++ std::swap(type, o.type); ++ std::swap(buffer, o.buffer); ++ std::swap(name, o.name); ++ std::swap(quantization, o.quantization); ++ std::swap(is_variable, o.is_variable); ++ std::swap(sparsity, o.sparsity); ++ std::swap(shape_signature, o.shape_signature); ++ return *this; ++} ++ + inline TensorT *Tensor::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new TensorT()); + UnPackTo(_o.get(), _resolver); +@@ -16198,6 +16255,25 @@ inline flatbuffers::Offset CreateOperator(flatbuffers::FlatBufferBuild + _intermediates); + } + ++inline SubGraphT::SubGraphT(const SubGraphT &o) ++ : inputs(o.inputs), ++ outputs(o.outputs), ++ name(o.name) { ++ tensors.reserve(o.tensors.size()); ++ for (const auto &v : o.tensors) { tensors.emplace_back((v) ? new tflite::TensorT(*v) : nullptr); } ++ operators.reserve(o.operators.size()); ++ for (const auto &v : o.operators) { operators.emplace_back((v) ? new tflite::OperatorT(*v) : nullptr); } ++} ++ ++inline SubGraphT &SubGraphT::operator=(SubGraphT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(tensors, o.tensors); ++ std::swap(inputs, o.inputs); ++ std::swap(outputs, o.outputs); ++ std::swap(operators, o.operators); ++ std::swap(name, o.name); ++ return *this; ++} ++ + inline SubGraphT *SubGraph::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new SubGraphT()); + UnPackTo(_o.get(), _resolver); +@@ -16321,6 +16397,23 @@ inline flatbuffers::Offset CreateTensorMap(flatbuffers::FlatBufferBui + _tensor_index); + } + ++inline SignatureDefT::SignatureDefT(const SignatureDefT &o) ++ : signature_key(o.signature_key), ++ subgraph_index(o.subgraph_index) { ++ inputs.reserve(o.inputs.size()); ++ for (const auto &v : o.inputs) { inputs.emplace_back((v) ? new tflite::TensorMapT(*v) : nullptr); } ++ outputs.reserve(o.outputs.size()); ++ for (const auto &v : o.outputs) { outputs.emplace_back((v) ? new tflite::TensorMapT(*v) : nullptr); } ++} ++ ++inline SignatureDefT &SignatureDefT::operator=(SignatureDefT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(inputs, o.inputs); ++ std::swap(outputs, o.outputs); ++ std::swap(signature_key, o.signature_key); ++ std::swap(subgraph_index, o.subgraph_index); ++ return *this; ++} ++ + inline SignatureDefT *SignatureDef::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new SignatureDefT()); + UnPackTo(_o.get(), _resolver); +@@ -16356,6 +16449,34 @@ inline flatbuffers::Offset CreateSignatureDef(flatbuffers::FlatBuf + _subgraph_index); + } + ++inline ModelT::ModelT(const ModelT &o) ++ : version(o.version), ++ description(o.description), ++ metadata_buffer(o.metadata_buffer) { ++ operator_codes.reserve(o.operator_codes.size()); ++ for (const auto &v : o.operator_codes) { operator_codes.emplace_back((v) ? new tflite::OperatorCodeT(*v) : nullptr); } ++ subgraphs.reserve(o.subgraphs.size()); ++ for (const auto &v : o.subgraphs) { subgraphs.emplace_back((v) ? new tflite::SubGraphT(*v) : nullptr); } ++ buffers.reserve(o.buffers.size()); ++ for (const auto &v : o.buffers) { buffers.emplace_back((v) ? new tflite::BufferT(*v) : nullptr); } ++ metadata.reserve(o.metadata.size()); ++ for (const auto &v : o.metadata) { metadata.emplace_back((v) ? new tflite::MetadataT(*v) : nullptr); } ++ signature_defs.reserve(o.signature_defs.size()); ++ for (const auto &v : o.signature_defs) { signature_defs.emplace_back((v) ? new tflite::SignatureDefT(*v) : nullptr); } ++} ++ ++inline ModelT &ModelT::operator=(ModelT o) FLATBUFFERS_NOEXCEPT { ++ std::swap(version, o.version); ++ std::swap(operator_codes, o.operator_codes); ++ std::swap(subgraphs, o.subgraphs); ++ std::swap(description, o.description); ++ std::swap(buffers, o.buffers); ++ std::swap(metadata_buffer, o.metadata_buffer); ++ std::swap(metadata, o.metadata); ++ std::swap(signature_defs, o.signature_defs); ++ return *this; ++} ++ + inline ModelT *Model::UnPack(const flatbuffers::resolver_function_t *_resolver) const { + auto _o = std::unique_ptr(new ModelT()); + UnPackTo(_o.get(), _resolver); +@@ -19111,6 +19232,11 @@ inline bool ModelBufferHasIdentifier(const void *buf) { + buf, ModelIdentifier()); + } + ++inline bool SizePrefixedModelBufferHasIdentifier(const void *buf) { ++ return flatbuffers::BufferHasIdentifier( ++ buf, ModelIdentifier(), true); ++} ++ + inline bool VerifyModelBuffer( + flatbuffers::Verifier &verifier) { + return verifier.VerifyBuffer(ModelIdentifier()); +diff --git a/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake +index ac91a03a48a..d1d06d09505 100644 +--- a/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake ++++ b/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake +@@ -23,7 +23,7 @@ OverridableFetchContent_Declare( + flatbuffers + GIT_REPOSITORY https://github.com/google/flatbuffers + # Sync with tensorflow/third_party/flatbuffers/workspace.bzl +- GIT_TAG v2.0.5 ++ GIT_TAG v2.0.6 + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + SOURCE_DIR "${CMAKE_BINARY_DIR}/flatbuffers" +diff --git a/tensorflow/opensource_only.files b/tensorflow/opensource_only.files +index 8cf130f5509..8ccaae2b9c6 100644 +--- a/tensorflow/opensource_only.files ++++ b/tensorflow/opensource_only.files +@@ -61,6 +61,7 @@ tensorflow/lite/delegates/gpu/cl/serialization_generated.h: + tensorflow/lite/delegates/gpu/common/gpu_model_generated.h: + tensorflow/lite/delegates/gpu/common/task/serialization_base_generated.h: + tensorflow/lite/delegates/hexagon/hexagon_nn/BUILD: ++tensorflow/lite/experimental/acceleration/configuration/configuration_generated.h: + tensorflow/lite/experimental/acceleration/mini_benchmark/libjpeg.h: + tensorflow/lite/experimental/acceleration/mini_benchmark/special_rules.bzl: + tensorflow/lite/ios/BUILD: +diff --git a/third_party/flatbuffers/workspace.bzl b/third_party/flatbuffers/workspace.bzl +index 84aae9dc51f..ceb8a2720da 100644 +--- a/third_party/flatbuffers/workspace.bzl ++++ b/third_party/flatbuffers/workspace.bzl +@@ -5,9 +5,9 @@ load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") + def repo(): + tf_http_archive( + name = "flatbuffers", +- strip_prefix = "flatbuffers-2.0.5", +- sha256 = "b01e97c988c429e164c5c7df9e87c80007ca87f593c0d73733ba536ddcbc8f98", +- urls = tf_mirror_urls("https://github.com/google/flatbuffers/archive/v2.0.5.tar.gz"), ++ strip_prefix = "flatbuffers-2.0.6", ++ sha256 = "e2dc24985a85b278dd06313481a9ca051d048f9474e0f199e372fea3ea4248c9", ++ urls = tf_mirror_urls("https://github.com/google/flatbuffers/archive/v2.0.6.tar.gz"), + build_file = "//third_party/flatbuffers:flatbuffers.BUILD", + system_build_file = "//third_party/flatbuffers:BUILD.system", + link_files = { diff --git a/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_support_flatbuffers_2.0.patch b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_support_flatbuffers_2.0.patch new file mode 100644 index 00000000000..81077042987 --- /dev/null +++ b/easybuild/easyconfigs/t/TensorFlow/TensorFlow-2.9.1_support_flatbuffers_2.0.patch @@ -0,0 +1,8002 @@ +Add support for flatbuffers 2.0. +Taken from https://github.com/tensorflow/tensorflow/commit/625a4045bc0728c0f3d1b63e05749201f8b401dd + +Backported to 2.9.1 by +Author: Alexander Grund (TU Dresden) + +diff --git a/tensorflow/compiler/mlir/lite/flatbuffer_export.cc b/tensorflow/compiler/mlir/lite/flatbuffer_export.cc +index 9467afdf3c5..b75d55204c1 100644 +--- a/tensorflow/compiler/mlir/lite/flatbuffer_export.cc ++++ b/tensorflow/compiler/mlir/lite/flatbuffer_export.cc +@@ -784,17 +784,19 @@ Optional> Translator::BuildTensorFromType( + GetTFLiteType(tensor_type.getElementType()).ValueOrDie(); + BufferOffset q_params = 0; + if (auto qtype = element_type.dyn_cast()) { ++ std::vector scales = {static_cast(qtype.getScale())}; ++ std::vector zero_points = {qtype.getZeroPoint()}; + q_params = tflite::CreateQuantizationParameters( +- builder_, /*min=*/0, /*max=*/0, +- builder_.CreateVector({static_cast(qtype.getScale())}), +- builder_.CreateVector({qtype.getZeroPoint()})); ++ builder_, /*min=*/0, /*max=*/0, builder_.CreateVector(scales), ++ builder_.CreateVector(zero_points)); + } else if (auto qtype = + element_type + .dyn_cast()) { ++ std::vector mins = {static_cast(qtype.getMin())}; ++ std::vector maxs = {static_cast(qtype.getMax())}; + q_params = tflite::CreateQuantizationParameters( +- builder_, +- builder_.CreateVector({static_cast(qtype.getMin())}), +- builder_.CreateVector({static_cast(qtype.getMax())})); ++ builder_, builder_.CreateVector(mins), ++ builder_.CreateVector(maxs)); + } + return tflite::CreateTensor( + builder_, builder_.CreateVector(shape), tflite_element_type, +@@ -868,20 +870,23 @@ Optional> Translator::BuildTensor( + + BufferOffset q_params; + if (auto qtype = element_type.dyn_cast()) { ++ std::vector scales = {static_cast(qtype.getScale())}; ++ std::vector zero_points = {qtype.getZeroPoint()}; + q_params = tflite::CreateQuantizationParameters( + // min and max values are not stored in the quantized type from MLIR, so + // both are set to 0 in the flatbuffer when they are exported. +- builder_, /*min=*/0, /*max=*/0, +- builder_.CreateVector({static_cast(qtype.getScale())}), +- builder_.CreateVector({qtype.getZeroPoint()})); ++ builder_, /*min=*/0, /*max=*/0, builder_.CreateVector(scales), ++ builder_.CreateVector(zero_points)); + } else if (auto qtype = + element_type + .dyn_cast()) { + std::vector scales(qtype.getScales().begin(), + qtype.getScales().end()); ++ std::vector zero_points(qtype.getZeroPoints().begin(), ++ qtype.getZeroPoints().end()); + q_params = tflite::CreateQuantizationParameters( + builder_, /*min=*/0, /*max=*/0, builder_.CreateVector(scales), +- builder_.CreateVector(qtype.getZeroPoints()), ++ builder_.CreateVector(zero_points), + tflite::QuantizationDetails_NONE, /*details=*/0, + qtype.getQuantizedDimension()); + } else if (quant_parameters.hasValue()) { +diff --git a/tensorflow/compiler/mlir/lite/quantization/lite/quantize_model_test.cc b/tensorflow/compiler/mlir/lite/quantization/lite/quantize_model_test.cc +index 6075c6515bd..cd67fad748a 100644 +--- a/tensorflow/compiler/mlir/lite/quantization/lite/quantize_model_test.cc ++++ b/tensorflow/compiler/mlir/lite/quantization/lite/quantize_model_test.cc +@@ -210,7 +210,7 @@ void ExpectSameModels(const ModelT& model, const ModelT& expected_model) { + continue; + } + ExpectEqualTensor(tensor.get(), expected_tensor); +- if (tensor->buffer >= 0) { ++ if (expected_tensor->buffer > 0) { + const int buffer_idx = tensor->buffer; + const int expected_buffer_idx = expected_tensor->buffer; + const auto buffer = model.buffers[buffer_idx].get()->data; +diff --git a/tensorflow/lite/kernels/test_util.cc b/tensorflow/lite/kernels/test_util.cc +index 0e97b89bca4..eef287d6267 100644 +--- a/tensorflow/lite/kernels/test_util.cc ++++ b/tensorflow/lite/kernels/test_util.cc +@@ -112,7 +112,8 @@ int SingleOpModel::AddIntermediate(TensorType type, + CreateQuantizationParameters(builder_, /*min=*/0, /*max=*/0, + builder_.CreateVector(scale), + builder_.CreateVector(zero_point)); +- tensors_.push_back(CreateTensor(builder_, builder_.CreateVector({}), ++ std::vector empty; ++ tensors_.push_back(CreateTensor(builder_, builder_.CreateVector(empty), + type, + /*buffer=*/0, + /*name=*/0, q_params, false)); +diff --git a/tensorflow/lite/kernels/test_util.h b/tensorflow/lite/kernels/test_util.h +index cf61f32a9c9..81bab720d79 100644 +--- a/tensorflow/lite/kernels/test_util.h ++++ b/tensorflow/lite/kernels/test_util.h +@@ -245,12 +245,12 @@ class SingleOpModel { + if (i < t.shape.size() && + t.format[t.traversal_order[i]] == kTfLiteDimSparseCSR) { + auto array_segments = +- CreateInt32Vector(builder_, +- builder_.CreateVector(dim_metadata[metadata_idx])) ++ CreateInt32Vector(builder_, builder_.CreateVector( ++ dim_metadata[metadata_idx])) + .Union(); + auto array_indices = +- CreateInt32Vector( +- builder_, builder_.CreateVector(dim_metadata[metadata_idx + 1])) ++ CreateInt32Vector(builder_, builder_.CreateVector( ++ dim_metadata[metadata_idx + 1])) + .Union(); + fb_dim_metadata[i] = CreateDimensionMetadata( + builder_, DimensionType_SPARSE_CSR, 0, +@@ -263,8 +263,8 @@ class SingleOpModel { + } + + flatbuffers::Offset s_param = CreateSparsityParameters( +- builder_, builder_.CreateVector(t.traversal_order), +- builder_.CreateVector(t.block_map), ++ builder_, builder_.CreateVector(t.traversal_order), ++ builder_.CreateVector(t.block_map), + builder_.CreateVector(fb_dim_metadata)); + + int buffer_id = 0; +@@ -359,9 +359,11 @@ class SingleOpModel { + float min, max, scaling_factor; + tensor_utils::SymmetricQuantizeFloats( + sparse_data.data(), length, q.data(), &min, &max, &scaling_factor); ++ std::vector scales{scaling_factor}; ++ std::vector zero_points{0}; + q_params = CreateQuantizationParameters( +- builder_, 0, 0, builder_.CreateVector({scaling_factor}), +- builder_.CreateVector({0})); ++ builder_, 0, 0, builder_.CreateVector(scales), ++ builder_.CreateVector(zero_points)); + auto data_buffer = builder_.CreateVector( + reinterpret_cast(q.data()), q.size()); + buffers_.push_back(CreateBuffer(builder_, data_buffer)); +@@ -369,9 +371,11 @@ class SingleOpModel { + CHECK_EQ(t.type, TensorType_INT8) + << "The INT8 quantization is only supported for sparsified tensor"; + auto q = Quantize(sparse_data, t.scale, t.zero_point); ++ std::vector scales{t.scale}; ++ std::vector zero_points{0}; + q_params = CreateQuantizationParameters( +- builder_, t.min, t.max, builder_.CreateVector({t.scale}), +- builder_.CreateVector({0})); ++ builder_, t.min, t.max, builder_.CreateVector(scales), ++ builder_.CreateVector(zero_points)); + auto data_buffer = builder_.CreateVector( + reinterpret_cast(q.data()), q.size()); + buffers_.push_back(CreateBuffer(builder_, data_buffer)); +@@ -690,10 +694,11 @@ class SingleOpModel { + t.max = 0; + } + ++ std::vector scales{t.scale}; ++ std::vector zero_points{t.zero_point}; + q_params = CreateQuantizationParameters( +- builder_, /*min=*/0, /*max=*/0, +- builder_.CreateVector({t.scale}), +- builder_.CreateVector({t.zero_point})); ++ builder_, /*min=*/0, /*max=*/0, builder_.CreateVector(scales), ++ builder_.CreateVector(zero_points)); + } + + int buffer_id = 0; +diff --git a/tensorflow/lite/schema/BUILD b/tensorflow/lite/schema/BUILD +index eb3d9df659d..7d1f2b7a2e3 100644 +--- a/tensorflow/lite/schema/BUILD ++++ b/tensorflow/lite/schema/BUILD +@@ -77,6 +77,11 @@ py_test( + # "//tensorflow/lite/schema:schema_generated.h.oss", + # ], + # python_version = "PY3", ++# # TODO(b/217577534): Enable this TAP with FlatBuffer 2.0 migration. ++# tags = [ ++# "manual", ++# "notap", ++# ], + # deps = [ + # "//testing/pybase", + # "@absl_py//absl/flags", +diff --git a/tensorflow/lite/schema/schema_generated.h b/tensorflow/lite/schema/schema_generated.h +index e5ce189f147..0de55f064ef 100755 +--- a/tensorflow/lite/schema/schema_generated.h ++++ b/tensorflow/lite/schema/schema_generated.h +@@ -23,405 +23,538 @@ limitations under the License. + namespace tflite { + + struct CustomQuantization; ++struct CustomQuantizationBuilder; + struct CustomQuantizationT; + + struct QuantizationParameters; ++struct QuantizationParametersBuilder; + struct QuantizationParametersT; + + struct Int32Vector; ++struct Int32VectorBuilder; + struct Int32VectorT; + + struct Uint16Vector; ++struct Uint16VectorBuilder; + struct Uint16VectorT; + + struct Uint8Vector; ++struct Uint8VectorBuilder; + struct Uint8VectorT; + + struct DimensionMetadata; ++struct DimensionMetadataBuilder; + struct DimensionMetadataT; + + struct SparsityParameters; ++struct SparsityParametersBuilder; + struct SparsityParametersT; + + struct Tensor; ++struct TensorBuilder; + struct TensorT; + + struct Conv2DOptions; ++struct Conv2DOptionsBuilder; + struct Conv2DOptionsT; + + struct Conv3DOptions; ++struct Conv3DOptionsBuilder; + struct Conv3DOptionsT; + + struct Pool2DOptions; ++struct Pool2DOptionsBuilder; + struct Pool2DOptionsT; + + struct DepthwiseConv2DOptions; ++struct DepthwiseConv2DOptionsBuilder; + struct DepthwiseConv2DOptionsT; + + struct ConcatEmbeddingsOptions; ++struct ConcatEmbeddingsOptionsBuilder; + struct ConcatEmbeddingsOptionsT; + + struct LSHProjectionOptions; ++struct LSHProjectionOptionsBuilder; + struct LSHProjectionOptionsT; + + struct SVDFOptions; ++struct SVDFOptionsBuilder; + struct SVDFOptionsT; + + struct RNNOptions; ++struct RNNOptionsBuilder; + struct RNNOptionsT; + + struct SequenceRNNOptions; ++struct SequenceRNNOptionsBuilder; + struct SequenceRNNOptionsT; + + struct BidirectionalSequenceRNNOptions; ++struct BidirectionalSequenceRNNOptionsBuilder; + struct BidirectionalSequenceRNNOptionsT; + + struct FullyConnectedOptions; ++struct FullyConnectedOptionsBuilder; + struct FullyConnectedOptionsT; + + struct SoftmaxOptions; ++struct SoftmaxOptionsBuilder; + struct SoftmaxOptionsT; + + struct ConcatenationOptions; ++struct ConcatenationOptionsBuilder; + struct ConcatenationOptionsT; + + struct AddOptions; ++struct AddOptionsBuilder; + struct AddOptionsT; + + struct MulOptions; ++struct MulOptionsBuilder; + struct MulOptionsT; + + struct L2NormOptions; ++struct L2NormOptionsBuilder; + struct L2NormOptionsT; + + struct LocalResponseNormalizationOptions; ++struct LocalResponseNormalizationOptionsBuilder; + struct LocalResponseNormalizationOptionsT; + + struct LSTMOptions; ++struct LSTMOptionsBuilder; + struct LSTMOptionsT; + + struct UnidirectionalSequenceLSTMOptions; ++struct UnidirectionalSequenceLSTMOptionsBuilder; + struct UnidirectionalSequenceLSTMOptionsT; + + struct BidirectionalSequenceLSTMOptions; ++struct BidirectionalSequenceLSTMOptionsBuilder; + struct BidirectionalSequenceLSTMOptionsT; + + struct ResizeBilinearOptions; ++struct ResizeBilinearOptionsBuilder; + struct ResizeBilinearOptionsT; + + struct ResizeNearestNeighborOptions; ++struct ResizeNearestNeighborOptionsBuilder; + struct ResizeNearestNeighborOptionsT; + + struct CallOptions; ++struct CallOptionsBuilder; + struct CallOptionsT; + + struct PadOptions; ++struct PadOptionsBuilder; + struct PadOptionsT; + + struct PadV2Options; ++struct PadV2OptionsBuilder; + struct PadV2OptionsT; + + struct ReshapeOptions; ++struct ReshapeOptionsBuilder; + struct ReshapeOptionsT; + + struct SpaceToBatchNDOptions; ++struct SpaceToBatchNDOptionsBuilder; + struct SpaceToBatchNDOptionsT; + + struct BatchToSpaceNDOptions; ++struct BatchToSpaceNDOptionsBuilder; + struct BatchToSpaceNDOptionsT; + + struct SkipGramOptions; ++struct SkipGramOptionsBuilder; + struct SkipGramOptionsT; + + struct SpaceToDepthOptions; ++struct SpaceToDepthOptionsBuilder; + struct SpaceToDepthOptionsT; + + struct DepthToSpaceOptions; ++struct DepthToSpaceOptionsBuilder; + struct DepthToSpaceOptionsT; + + struct SubOptions; ++struct SubOptionsBuilder; + struct SubOptionsT; + + struct DivOptions; ++struct DivOptionsBuilder; + struct DivOptionsT; + + struct TopKV2Options; ++struct TopKV2OptionsBuilder; + struct TopKV2OptionsT; + + struct EmbeddingLookupSparseOptions; ++struct EmbeddingLookupSparseOptionsBuilder; + struct EmbeddingLookupSparseOptionsT; + + struct GatherOptions; ++struct GatherOptionsBuilder; + struct GatherOptionsT; + + struct TransposeOptions; ++struct TransposeOptionsBuilder; + struct TransposeOptionsT; + + struct ExpOptions; ++struct ExpOptionsBuilder; + struct ExpOptionsT; + + struct CosOptions; ++struct CosOptionsBuilder; + struct CosOptionsT; + + struct ReducerOptions; ++struct ReducerOptionsBuilder; + struct ReducerOptionsT; + + struct SqueezeOptions; ++struct SqueezeOptionsBuilder; + struct SqueezeOptionsT; + + struct SplitOptions; ++struct SplitOptionsBuilder; + struct SplitOptionsT; + + struct SplitVOptions; ++struct SplitVOptionsBuilder; + struct SplitVOptionsT; + + struct StridedSliceOptions; ++struct StridedSliceOptionsBuilder; + struct StridedSliceOptionsT; + + struct LogSoftmaxOptions; ++struct LogSoftmaxOptionsBuilder; + struct LogSoftmaxOptionsT; + + struct CastOptions; ++struct CastOptionsBuilder; + struct CastOptionsT; + + struct DequantizeOptions; ++struct DequantizeOptionsBuilder; + struct DequantizeOptionsT; + + struct MaximumMinimumOptions; ++struct MaximumMinimumOptionsBuilder; + struct MaximumMinimumOptionsT; + + struct TileOptions; ++struct TileOptionsBuilder; + struct TileOptionsT; + + struct ArgMaxOptions; ++struct ArgMaxOptionsBuilder; + struct ArgMaxOptionsT; + + struct ArgMinOptions; ++struct ArgMinOptionsBuilder; + struct ArgMinOptionsT; + + struct GreaterOptions; ++struct GreaterOptionsBuilder; + struct GreaterOptionsT; + + struct GreaterEqualOptions; ++struct GreaterEqualOptionsBuilder; + struct GreaterEqualOptionsT; + + struct LessOptions; ++struct LessOptionsBuilder; + struct LessOptionsT; + + struct LessEqualOptions; ++struct LessEqualOptionsBuilder; + struct LessEqualOptionsT; + + struct NegOptions; ++struct NegOptionsBuilder; + struct NegOptionsT; + + struct SelectOptions; ++struct SelectOptionsBuilder; + struct SelectOptionsT; + + struct SliceOptions; ++struct SliceOptionsBuilder; + struct SliceOptionsT; + + struct TransposeConvOptions; ++struct TransposeConvOptionsBuilder; + struct TransposeConvOptionsT; + + struct ExpandDimsOptions; ++struct ExpandDimsOptionsBuilder; + struct ExpandDimsOptionsT; + + struct SparseToDenseOptions; ++struct SparseToDenseOptionsBuilder; + struct SparseToDenseOptionsT; + + struct EqualOptions; ++struct EqualOptionsBuilder; + struct EqualOptionsT; + + struct NotEqualOptions; ++struct NotEqualOptionsBuilder; + struct NotEqualOptionsT; + + struct ShapeOptions; ++struct ShapeOptionsBuilder; + struct ShapeOptionsT; + + struct RankOptions; ++struct RankOptionsBuilder; + struct RankOptionsT; + + struct PowOptions; ++struct PowOptionsBuilder; + struct PowOptionsT; + + struct FakeQuantOptions; ++struct FakeQuantOptionsBuilder; + struct FakeQuantOptionsT; + + struct PackOptions; ++struct PackOptionsBuilder; + struct PackOptionsT; + + struct LogicalOrOptions; ++struct LogicalOrOptionsBuilder; + struct LogicalOrOptionsT; + + struct OneHotOptions; ++struct OneHotOptionsBuilder; + struct OneHotOptionsT; + + struct AbsOptions; ++struct AbsOptionsBuilder; + struct AbsOptionsT; + + struct HardSwishOptions; ++struct HardSwishOptionsBuilder; + struct HardSwishOptionsT; + + struct LogicalAndOptions; ++struct LogicalAndOptionsBuilder; + struct LogicalAndOptionsT; + + struct LogicalNotOptions; ++struct LogicalNotOptionsBuilder; + struct LogicalNotOptionsT; + + struct UnpackOptions; ++struct UnpackOptionsBuilder; + struct UnpackOptionsT; + + struct FloorDivOptions; ++struct FloorDivOptionsBuilder; + struct FloorDivOptionsT; + + struct SquareOptions; ++struct SquareOptionsBuilder; + struct SquareOptionsT; + + struct ZerosLikeOptions; ++struct ZerosLikeOptionsBuilder; + struct ZerosLikeOptionsT; + + struct FillOptions; ++struct FillOptionsBuilder; + struct FillOptionsT; + + struct FloorModOptions; ++struct FloorModOptionsBuilder; + struct FloorModOptionsT; + + struct RangeOptions; ++struct RangeOptionsBuilder; + struct RangeOptionsT; + + struct LeakyReluOptions; ++struct LeakyReluOptionsBuilder; + struct LeakyReluOptionsT; + + struct SquaredDifferenceOptions; ++struct SquaredDifferenceOptionsBuilder; + struct SquaredDifferenceOptionsT; + + struct MirrorPadOptions; ++struct MirrorPadOptionsBuilder; + struct MirrorPadOptionsT; + + struct UniqueOptions; ++struct UniqueOptionsBuilder; + struct UniqueOptionsT; + + struct ReverseV2Options; ++struct ReverseV2OptionsBuilder; + struct ReverseV2OptionsT; + + struct AddNOptions; ++struct AddNOptionsBuilder; + struct AddNOptionsT; + + struct GatherNdOptions; ++struct GatherNdOptionsBuilder; + struct GatherNdOptionsT; + + struct WhereOptions; ++struct WhereOptionsBuilder; + struct WhereOptionsT; + + struct ReverseSequenceOptions; ++struct ReverseSequenceOptionsBuilder; + struct ReverseSequenceOptionsT; + + struct MatrixDiagOptions; ++struct MatrixDiagOptionsBuilder; + struct MatrixDiagOptionsT; + + struct QuantizeOptions; ++struct QuantizeOptionsBuilder; + struct QuantizeOptionsT; + + struct MatrixSetDiagOptions; ++struct MatrixSetDiagOptionsBuilder; + struct MatrixSetDiagOptionsT; + + struct IfOptions; ++struct IfOptionsBuilder; + struct IfOptionsT; + + struct CallOnceOptions; ++struct CallOnceOptionsBuilder; + struct CallOnceOptionsT; + + struct WhileOptions; ++struct WhileOptionsBuilder; + struct WhileOptionsT; + + struct NonMaxSuppressionV4Options; ++struct NonMaxSuppressionV4OptionsBuilder; + struct NonMaxSuppressionV4OptionsT; + + struct NonMaxSuppressionV5Options; ++struct NonMaxSuppressionV5OptionsBuilder; + struct NonMaxSuppressionV5OptionsT; + + struct ScatterNdOptions; ++struct ScatterNdOptionsBuilder; + struct ScatterNdOptionsT; + + struct SelectV2Options; ++struct SelectV2OptionsBuilder; + struct SelectV2OptionsT; + + struct DensifyOptions; ++struct DensifyOptionsBuilder; + struct DensifyOptionsT; + + struct SegmentSumOptions; ++struct SegmentSumOptionsBuilder; + struct SegmentSumOptionsT; + + struct BatchMatMulOptions; ++struct BatchMatMulOptionsBuilder; + struct BatchMatMulOptionsT; + + struct CumsumOptions; ++struct CumsumOptionsBuilder; + struct CumsumOptionsT; + + struct BroadcastToOptions; ++struct BroadcastToOptionsBuilder; + struct BroadcastToOptionsT; + + struct Rfft2dOptions; ++struct Rfft2dOptionsBuilder; + struct Rfft2dOptionsT; + + struct HashtableOptions; ++struct HashtableOptionsBuilder; + struct HashtableOptionsT; + + struct HashtableFindOptions; ++struct HashtableFindOptionsBuilder; + struct HashtableFindOptionsT; + + struct HashtableImportOptions; ++struct HashtableImportOptionsBuilder; + struct HashtableImportOptionsT; + + struct HashtableSizeOptions; ++struct HashtableSizeOptionsBuilder; + struct HashtableSizeOptionsT; + + struct VarHandleOptions; ++struct VarHandleOptionsBuilder; + struct VarHandleOptionsT; + + struct ReadVariableOptions; ++struct ReadVariableOptionsBuilder; + struct ReadVariableOptionsT; + + struct AssignVariableOptions; ++struct AssignVariableOptionsBuilder; + struct AssignVariableOptionsT; + + struct RandomOptions; ++struct RandomOptionsBuilder; + struct RandomOptionsT; + + struct BucketizeOptions; ++struct BucketizeOptionsBuilder; + struct BucketizeOptionsT; + + struct GeluOptions; ++struct GeluOptionsBuilder; + struct GeluOptionsT; + + struct DynamicUpdateSliceOptions; ++struct DynamicUpdateSliceOptionsBuilder; + struct DynamicUpdateSliceOptionsT; + + struct OperatorCode; ++struct OperatorCodeBuilder; + struct OperatorCodeT; + + struct Operator; ++struct OperatorBuilder; + struct OperatorT; + + struct SubGraph; ++struct SubGraphBuilder; + struct SubGraphT; + + struct Buffer; ++struct BufferBuilder; + struct BufferT; + + struct Metadata; ++struct MetadataBuilder; + struct MetadataT; + + struct TensorMap; ++struct TensorMapBuilder; + struct TensorMapT; + + struct SignatureDef; ++struct SignatureDefBuilder; + struct SignatureDefT; + + struct Model; ++struct ModelBuilder; + struct ModelT; + +-enum TensorType { ++enum TensorType : int8_t { + TensorType_FLOAT32 = 0, + TensorType_FLOAT16 = 1, + TensorType_INT32 = 2, +@@ -496,7 +629,7 @@ inline const char *EnumNameTensorType(TensorType e) { + return EnumNamesTensorType()[index]; + } + +-enum QuantizationDetails { ++enum QuantizationDetails : uint8_t { + QuantizationDetails_NONE = 0, + QuantizationDetails_CustomQuantization = 1, + QuantizationDetails_MIN = QuantizationDetails_NONE, +@@ -534,6 +667,14 @@ template<> struct QuantizationDetailsTraits { + static const QuantizationDetails enum_value = QuantizationDetails_CustomQuantization; + }; + ++template struct QuantizationDetailsUnionTraits { ++ static const QuantizationDetails enum_value = QuantizationDetails_NONE; ++}; ++ ++template<> struct QuantizationDetailsUnionTraits { ++ static const QuantizationDetails enum_value = QuantizationDetails_CustomQuantization; ++}; ++ + struct QuantizationDetailsUnion { + QuantizationDetails type; + void *value; +@@ -542,8 +683,8 @@ struct QuantizationDetailsUnion { + QuantizationDetailsUnion(QuantizationDetailsUnion&& u) FLATBUFFERS_NOEXCEPT : + type(QuantizationDetails_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } +- QuantizationDetailsUnion(const QuantizationDetailsUnion &) FLATBUFFERS_NOEXCEPT; +- QuantizationDetailsUnion &operator=(const QuantizationDetailsUnion &u) FLATBUFFERS_NOEXCEPT ++ QuantizationDetailsUnion(const QuantizationDetailsUnion &); ++ QuantizationDetailsUnion &operator=(const QuantizationDetailsUnion &u) + { QuantizationDetailsUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } + QuantizationDetailsUnion &operator=(QuantizationDetailsUnion &&u) FLATBUFFERS_NOEXCEPT + { std::swap(type, u.type); std::swap(value, u.value); return *this; } +@@ -551,17 +692,15 @@ struct QuantizationDetailsUnion { + + void Reset(); + +-#ifndef FLATBUFFERS_CPP98_STL + template + void Set(T&& val) { +- using RT = typename std::remove_reference::type; ++ typedef typename std::remove_reference::type RT; + Reset(); +- type = QuantizationDetailsTraits::enum_value; ++ type = QuantizationDetailsUnionTraits::enum_value; + if (type != QuantizationDetails_NONE) { + value = new RT(std::forward(val)); + } + } +-#endif // FLATBUFFERS_CPP98_STL + + static void *UnPack(const void *obj, QuantizationDetails type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; +@@ -579,7 +718,7 @@ struct QuantizationDetailsUnion { + bool VerifyQuantizationDetails(flatbuffers::Verifier &verifier, const void *obj, QuantizationDetails type); + bool VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +-enum DimensionType { ++enum DimensionType : int8_t { + DimensionType_DENSE = 0, + DimensionType_SPARSE_CSR = 1, + DimensionType_MIN = DimensionType_DENSE, +@@ -609,7 +748,7 @@ inline const char *EnumNameDimensionType(DimensionType e) { + return EnumNamesDimensionType()[index]; + } + +-enum SparseIndexVector { ++enum SparseIndexVector : uint8_t { + SparseIndexVector_NONE = 0, + SparseIndexVector_Int32Vector = 1, + SparseIndexVector_Uint16Vector = 2, +@@ -661,6 +800,22 @@ template<> struct SparseIndexVectorTraits { + static const SparseIndexVector enum_value = SparseIndexVector_Uint8Vector; + }; + ++template struct SparseIndexVectorUnionTraits { ++ static const SparseIndexVector enum_value = SparseIndexVector_NONE; ++}; ++ ++template<> struct SparseIndexVectorUnionTraits { ++ static const SparseIndexVector enum_value = SparseIndexVector_Int32Vector; ++}; ++ ++template<> struct SparseIndexVectorUnionTraits { ++ static const SparseIndexVector enum_value = SparseIndexVector_Uint16Vector; ++}; ++ ++template<> struct SparseIndexVectorUnionTraits { ++ static const SparseIndexVector enum_value = SparseIndexVector_Uint8Vector; ++}; ++ + struct SparseIndexVectorUnion { + SparseIndexVector type; + void *value; +@@ -669,8 +824,8 @@ struct SparseIndexVectorUnion { + SparseIndexVectorUnion(SparseIndexVectorUnion&& u) FLATBUFFERS_NOEXCEPT : + type(SparseIndexVector_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } +- SparseIndexVectorUnion(const SparseIndexVectorUnion &) FLATBUFFERS_NOEXCEPT; +- SparseIndexVectorUnion &operator=(const SparseIndexVectorUnion &u) FLATBUFFERS_NOEXCEPT ++ SparseIndexVectorUnion(const SparseIndexVectorUnion &); ++ SparseIndexVectorUnion &operator=(const SparseIndexVectorUnion &u) + { SparseIndexVectorUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } + SparseIndexVectorUnion &operator=(SparseIndexVectorUnion &&u) FLATBUFFERS_NOEXCEPT + { std::swap(type, u.type); std::swap(value, u.value); return *this; } +@@ -678,17 +833,15 @@ struct SparseIndexVectorUnion { + + void Reset(); + +-#ifndef FLATBUFFERS_CPP98_STL + template + void Set(T&& val) { +- using RT = typename std::remove_reference::type; ++ typedef typename std::remove_reference::type RT; + Reset(); +- type = SparseIndexVectorTraits::enum_value; ++ type = SparseIndexVectorUnionTraits::enum_value; + if (type != SparseIndexVector_NONE) { + value = new RT(std::forward(val)); + } + } +-#endif // FLATBUFFERS_CPP98_STL + + static void *UnPack(const void *obj, SparseIndexVector type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; +@@ -722,7 +875,7 @@ struct SparseIndexVectorUnion { + bool VerifySparseIndexVector(flatbuffers::Verifier &verifier, const void *obj, SparseIndexVector type); + bool VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +-enum BuiltinOperator { ++enum BuiltinOperator : int32_t { + BuiltinOperator_ADD = 0, + BuiltinOperator_AVERAGE_POOL_2D = 1, + BuiltinOperator_CONCATENATION = 2, +@@ -1202,7 +1355,7 @@ inline const char *EnumNameBuiltinOperator(BuiltinOperator e) { + return EnumNamesBuiltinOperator()[index]; + } + +-enum BuiltinOptions { ++enum BuiltinOptions : uint8_t { + BuiltinOptions_NONE = 0, + BuiltinOptions_Conv2DOptions = 1, + BuiltinOptions_DepthwiseConv2DOptions = 2, +@@ -2052,6 +2205,478 @@ template<> struct BuiltinOptionsTraits { + static const BuiltinOptions enum_value = BuiltinOptions_DynamicUpdateSliceOptions; + }; + ++template struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_NONE; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_Conv2DOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_DepthwiseConv2DOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ConcatEmbeddingsOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LSHProjectionOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_Pool2DOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SVDFOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_RNNOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_FullyConnectedOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SoftmaxOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ConcatenationOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_AddOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_L2NormOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LocalResponseNormalizationOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LSTMOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ResizeBilinearOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_CallOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ReshapeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SkipGramOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SpaceToDepthOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_EmbeddingLookupSparseOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_MulOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_PadOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_GatherOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_BatchToSpaceNDOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SpaceToBatchNDOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_TransposeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ReducerOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SubOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_DivOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SqueezeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SequenceRNNOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_StridedSliceOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ExpOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_TopKV2Options; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SplitOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LogSoftmaxOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_CastOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_DequantizeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_MaximumMinimumOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ArgMaxOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LessOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_NegOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_PadV2Options; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_GreaterOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_GreaterEqualOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LessEqualOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SelectOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SliceOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_TransposeConvOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SparseToDenseOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_TileOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ExpandDimsOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_EqualOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_NotEqualOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ShapeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_PowOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ArgMinOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_FakeQuantOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_PackOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LogicalOrOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_OneHotOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LogicalAndOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LogicalNotOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_UnpackOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_FloorDivOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SquareOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ZerosLikeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_FillOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_BidirectionalSequenceLSTMOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_BidirectionalSequenceRNNOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_UnidirectionalSequenceLSTMOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_FloorModOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_RangeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ResizeNearestNeighborOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_LeakyReluOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SquaredDifferenceOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_MirrorPadOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_AbsOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SplitVOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_UniqueOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ReverseV2Options; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_AddNOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_GatherNdOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_CosOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_WhereOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_RankOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ReverseSequenceOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_MatrixDiagOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_QuantizeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_MatrixSetDiagOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_HardSwishOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_IfOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_WhileOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_DepthToSpaceOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_NonMaxSuppressionV4Options; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_NonMaxSuppressionV5Options; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ScatterNdOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SelectV2Options; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_DensifyOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_SegmentSumOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_BatchMatMulOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_CumsumOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_CallOnceOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_BroadcastToOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_Rfft2dOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_Conv3DOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_HashtableOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_HashtableFindOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_HashtableImportOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_HashtableSizeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_VarHandleOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_ReadVariableOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_AssignVariableOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_RandomOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_BucketizeOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_GeluOptions; ++}; ++ ++template<> struct BuiltinOptionsUnionTraits { ++ static const BuiltinOptions enum_value = BuiltinOptions_DynamicUpdateSliceOptions; ++}; ++ + struct BuiltinOptionsUnion { + BuiltinOptions type; + void *value; +@@ -2060,8 +2685,8 @@ struct BuiltinOptionsUnion { + BuiltinOptionsUnion(BuiltinOptionsUnion&& u) FLATBUFFERS_NOEXCEPT : + type(BuiltinOptions_NONE), value(nullptr) + { std::swap(type, u.type); std::swap(value, u.value); } +- BuiltinOptionsUnion(const BuiltinOptionsUnion &) FLATBUFFERS_NOEXCEPT; +- BuiltinOptionsUnion &operator=(const BuiltinOptionsUnion &u) FLATBUFFERS_NOEXCEPT ++ BuiltinOptionsUnion(const BuiltinOptionsUnion &); ++ BuiltinOptionsUnion &operator=(const BuiltinOptionsUnion &u) + { BuiltinOptionsUnion t(u); std::swap(type, t.type); std::swap(value, t.value); return *this; } + BuiltinOptionsUnion &operator=(BuiltinOptionsUnion &&u) FLATBUFFERS_NOEXCEPT + { std::swap(type, u.type); std::swap(value, u.value); return *this; } +@@ -2069,17 +2694,15 @@ struct BuiltinOptionsUnion { + + void Reset(); + +-#ifndef FLATBUFFERS_CPP98_STL + template + void Set(T&& val) { +- using RT = typename std::remove_reference::type; ++ typedef typename std::remove_reference::type RT; + Reset(); +- type = BuiltinOptionsTraits::enum_value; ++ type = BuiltinOptionsUnionTraits::enum_value; + if (type != BuiltinOptions_NONE) { + value = new RT(std::forward(val)); + } + } +-#endif // FLATBUFFERS_CPP98_STL + + static void *UnPack(const void *obj, BuiltinOptions type, const flatbuffers::resolver_function_t *resolver); + flatbuffers::Offset Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher = nullptr) const; +@@ -3025,7 +3648,7 @@ struct BuiltinOptionsUnion { + bool VerifyBuiltinOptions(flatbuffers::Verifier &verifier, const void *obj, BuiltinOptions type); + bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, const flatbuffers::Vector> *values, const flatbuffers::Vector *types); + +-enum Padding { ++enum Padding : int8_t { + Padding_SAME = 0, + Padding_VALID = 1, + Padding_MIN = Padding_SAME, +@@ -3055,7 +3678,7 @@ inline const char *EnumNamePadding(Padding e) { + return EnumNamesPadding()[index]; + } + +-enum ActivationFunctionType { ++enum ActivationFunctionType : int8_t { + ActivationFunctionType_NONE = 0, + ActivationFunctionType_RELU = 1, + ActivationFunctionType_RELU_N1_TO_1 = 2, +@@ -3097,7 +3720,7 @@ inline const char *EnumNameActivationFunctionType(ActivationFunctionType e) { + return EnumNamesActivationFunctionType()[index]; + } + +-enum LSHProjectionType { ++enum LSHProjectionType : int8_t { + LSHProjectionType_UNKNOWN = 0, + LSHProjectionType_SPARSE = 1, + LSHProjectionType_DENSE = 2, +@@ -3130,7 +3753,7 @@ inline const char *EnumNameLSHProjectionType(LSHProjectionType e) { + return EnumNamesLSHProjectionType()[index]; + } + +-enum FullyConnectedOptionsWeightsFormat { ++enum FullyConnectedOptionsWeightsFormat : int8_t { + FullyConnectedOptionsWeightsFormat_DEFAULT = 0, + FullyConnectedOptionsWeightsFormat_SHUFFLED4x16INT8 = 1, + FullyConnectedOptionsWeightsFormat_MIN = FullyConnectedOptionsWeightsFormat_DEFAULT, +@@ -3160,7 +3783,7 @@ inline const char *EnumNameFullyConnectedOptionsWeightsFormat(FullyConnectedOpti + return EnumNamesFullyConnectedOptionsWeightsFormat()[index]; + } + +-enum LSTMKernelType { ++enum LSTMKernelType : int8_t { + LSTMKernelType_FULL = 0, + LSTMKernelType_BASIC = 1, + LSTMKernelType_MIN = LSTMKernelType_FULL, +@@ -3190,7 +3813,7 @@ inline const char *EnumNameLSTMKernelType(LSTMKernelType e) { + return EnumNamesLSTMKernelType()[index]; + } + +-enum CombinerType { ++enum CombinerType : int8_t { + CombinerType_SUM = 0, + CombinerType_MEAN = 1, + CombinerType_SQRTN = 2, +@@ -3223,7 +3846,7 @@ inline const char *EnumNameCombinerType(CombinerType e) { + return EnumNamesCombinerType()[index]; + } + +-enum MirrorPadMode { ++enum MirrorPadMode : int8_t { + MirrorPadMode_REFLECT = 0, + MirrorPadMode_SYMMETRIC = 1, + MirrorPadMode_MIN = MirrorPadMode_REFLECT, +@@ -3253,7 +3876,7 @@ inline const char *EnumNameMirrorPadMode(MirrorPadMode e) { + return EnumNamesMirrorPadMode()[index]; + } + +-enum CustomOptionsFormat { ++enum CustomOptionsFormat : int8_t { + CustomOptionsFormat_FLEXBUFFERS = 0, + CustomOptionsFormat_MIN = CustomOptionsFormat_FLEXBUFFERS, + CustomOptionsFormat_MAX = CustomOptionsFormat_FLEXBUFFERS +@@ -3282,13 +3905,12 @@ inline const char *EnumNameCustomOptionsFormat(CustomOptionsFormat e) { + + struct CustomQuantizationT : public flatbuffers::NativeTable { + typedef CustomQuantization TableType; +- std::vector custom; +- CustomQuantizationT() { +- } ++ std::vector custom{}; + }; + + struct CustomQuantization FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CustomQuantizationT NativeTableType; ++ typedef CustomQuantizationBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CUSTOM = 4 + }; +@@ -3307,6 +3929,7 @@ struct CustomQuantization FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CustomQuantizationBuilder { ++ typedef CustomQuantization Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_custom(flatbuffers::Offset> custom) { +@@ -3316,7 +3939,6 @@ struct CustomQuantizationBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CustomQuantizationBuilder &operator=(const CustomQuantizationBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3346,19 +3968,17 @@ flatbuffers::Offset CreateCustomQuantization(flatbuffers::Fl + + struct QuantizationParametersT : public flatbuffers::NativeTable { + typedef QuantizationParameters TableType; +- std::vector min; +- std::vector max; +- std::vector scale; +- std::vector zero_point; +- tflite::QuantizationDetailsUnion details; +- int32_t quantized_dimension; +- QuantizationParametersT() +- : quantized_dimension(0) { +- } ++ std::vector min{}; ++ std::vector max{}; ++ std::vector scale{}; ++ std::vector zero_point{}; ++ tflite::QuantizationDetailsUnion details{}; ++ int32_t quantized_dimension = 0; + }; + + struct QuantizationParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizationParametersT NativeTableType; ++ typedef QuantizationParametersBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MIN = 4, + VT_MAX = 6, +@@ -3419,6 +4039,7 @@ template<> inline const tflite::CustomQuantization *QuantizationParameters::deta + } + + struct QuantizationParametersBuilder { ++ typedef QuantizationParameters Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_min(flatbuffers::Offset> min) { +@@ -3446,7 +4067,6 @@ struct QuantizationParametersBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizationParametersBuilder &operator=(const QuantizationParametersBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3502,13 +4122,12 @@ flatbuffers::Offset CreateQuantizationParameters(flatbuf + + struct Int32VectorT : public flatbuffers::NativeTable { + typedef Int32Vector TableType; +- std::vector values; +- Int32VectorT() { +- } ++ std::vector values{}; + }; + + struct Int32Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Int32VectorT NativeTableType; ++ typedef Int32VectorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES = 4 + }; +@@ -3527,6 +4146,7 @@ struct Int32Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Int32VectorBuilder { ++ typedef Int32Vector Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_values(flatbuffers::Offset> values) { +@@ -3536,7 +4156,6 @@ struct Int32VectorBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Int32VectorBuilder &operator=(const Int32VectorBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3565,13 +4184,12 @@ flatbuffers::Offset CreateInt32Vector(flatbuffers::FlatBufferBuilde + + struct Uint16VectorT : public flatbuffers::NativeTable { + typedef Uint16Vector TableType; +- std::vector values; +- Uint16VectorT() { +- } ++ std::vector values{}; + }; + + struct Uint16Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Uint16VectorT NativeTableType; ++ typedef Uint16VectorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES = 4 + }; +@@ -3590,6 +4208,7 @@ struct Uint16Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Uint16VectorBuilder { ++ typedef Uint16Vector Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_values(flatbuffers::Offset> values) { +@@ -3599,7 +4218,6 @@ struct Uint16VectorBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Uint16VectorBuilder &operator=(const Uint16VectorBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3629,13 +4247,12 @@ flatbuffers::Offset CreateUint16Vector(flatbuffers::FlatBufferBuil + + struct Uint8VectorT : public flatbuffers::NativeTable { + typedef Uint8Vector TableType; +- std::vector values; +- Uint8VectorT() { +- } ++ std::vector values{}; + }; + + struct Uint8Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Uint8VectorT NativeTableType; ++ typedef Uint8VectorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES = 4 + }; +@@ -3654,6 +4271,7 @@ struct Uint8Vector FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Uint8VectorBuilder { ++ typedef Uint8Vector Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_values(flatbuffers::Offset> values) { +@@ -3663,7 +4281,6 @@ struct Uint8VectorBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Uint8VectorBuilder &operator=(const Uint8VectorBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3693,18 +4310,15 @@ flatbuffers::Offset CreateUint8Vector(flatbuffers::FlatBufferBuilde + + struct DimensionMetadataT : public flatbuffers::NativeTable { + typedef DimensionMetadata TableType; +- tflite::DimensionType format; +- int32_t dense_size; +- tflite::SparseIndexVectorUnion array_segments; +- tflite::SparseIndexVectorUnion array_indices; +- DimensionMetadataT() +- : format(tflite::DimensionType_DENSE), +- dense_size(0) { +- } ++ tflite::DimensionType format = tflite::DimensionType_DENSE; ++ int32_t dense_size = 0; ++ tflite::SparseIndexVectorUnion array_segments{}; ++ tflite::SparseIndexVectorUnion array_indices{}; + }; + + struct DimensionMetadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DimensionMetadataT NativeTableType; ++ typedef DimensionMetadataBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FORMAT = 4, + VT_DENSE_SIZE = 6, +@@ -3793,6 +4407,7 @@ template<> inline const tflite::Uint8Vector *DimensionMetadata::array_indices_as + } + + struct DimensionMetadataBuilder { ++ typedef DimensionMetadata Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_format(tflite::DimensionType format) { +@@ -3817,7 +4432,6 @@ struct DimensionMetadataBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DimensionMetadataBuilder &operator=(const DimensionMetadataBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3847,15 +4461,14 @@ flatbuffers::Offset CreateDimensionMetadata(flatbuffers::Flat + + struct SparsityParametersT : public flatbuffers::NativeTable { + typedef SparsityParameters TableType; +- std::vector traversal_order; +- std::vector block_map; +- std::vector> dim_metadata; +- SparsityParametersT() { +- } ++ std::vector traversal_order{}; ++ std::vector block_map{}; ++ std::vector> dim_metadata{}; + }; + + struct SparsityParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SparsityParametersT NativeTableType; ++ typedef SparsityParametersBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TRAVERSAL_ORDER = 4, + VT_BLOCK_MAP = 6, +@@ -3887,6 +4500,7 @@ struct SparsityParameters FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SparsityParametersBuilder { ++ typedef SparsityParameters Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_traversal_order(flatbuffers::Offset> traversal_order) { +@@ -3902,7 +4516,6 @@ struct SparsityParametersBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SparsityParametersBuilder &operator=(const SparsityParametersBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -3941,23 +4554,19 @@ flatbuffers::Offset CreateSparsityParameters(flatbuffers::Fl + + struct TensorT : public flatbuffers::NativeTable { + typedef Tensor TableType; +- std::vector shape; +- tflite::TensorType type; +- uint32_t buffer; +- std::string name; +- std::unique_ptr quantization; +- bool is_variable; +- std::unique_ptr sparsity; +- std::vector shape_signature; +- TensorT() +- : type(tflite::TensorType_FLOAT32), +- buffer(0), +- is_variable(false) { +- } ++ std::vector shape{}; ++ tflite::TensorType type = tflite::TensorType_FLOAT32; ++ uint32_t buffer = 0; ++ std::string name{}; ++ std::unique_ptr quantization{}; ++ bool is_variable = false; ++ std::unique_ptr sparsity{}; ++ std::vector shape_signature{}; + }; + + struct Tensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TensorT NativeTableType; ++ typedef TensorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SHAPE = 4, + VT_TYPE = 6, +@@ -4015,6 +4624,7 @@ struct Tensor FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TensorBuilder { ++ typedef Tensor Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_shape(flatbuffers::Offset> shape) { +@@ -4045,7 +4655,6 @@ struct TensorBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TensorBuilder &operator=(const TensorBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4104,24 +4713,17 @@ flatbuffers::Offset CreateTensor(flatbuffers::FlatBufferBuilder &_fbb, c + + struct Conv2DOptionsT : public flatbuffers::NativeTable { + typedef Conv2DOptions TableType; +- tflite::Padding padding; +- int32_t stride_w; +- int32_t stride_h; +- tflite::ActivationFunctionType fused_activation_function; +- int32_t dilation_w_factor; +- int32_t dilation_h_factor; +- Conv2DOptionsT() +- : padding(tflite::Padding_SAME), +- stride_w(0), +- stride_h(0), +- fused_activation_function(tflite::ActivationFunctionType_NONE), +- dilation_w_factor(1), +- dilation_h_factor(1) { +- } ++ tflite::Padding padding = tflite::Padding_SAME; ++ int32_t stride_w = 0; ++ int32_t stride_h = 0; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ int32_t dilation_w_factor = 1; ++ int32_t dilation_h_factor = 1; + }; + + struct Conv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Conv2DOptionsT NativeTableType; ++ typedef Conv2DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_W = 6, +@@ -4164,6 +4766,7 @@ struct Conv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Conv2DOptionsBuilder { ++ typedef Conv2DOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_padding(tflite::Padding padding) { +@@ -4188,7 +4791,6 @@ struct Conv2DOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Conv2DOptionsBuilder &operator=(const Conv2DOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4218,28 +4820,19 @@ flatbuffers::Offset CreateConv2DOptions(flatbuffers::FlatBufferBu + + struct Conv3DOptionsT : public flatbuffers::NativeTable { + typedef Conv3DOptions TableType; +- tflite::Padding padding; +- int32_t stride_d; +- int32_t stride_w; +- int32_t stride_h; +- tflite::ActivationFunctionType fused_activation_function; +- int32_t dilation_d_factor; +- int32_t dilation_w_factor; +- int32_t dilation_h_factor; +- Conv3DOptionsT() +- : padding(tflite::Padding_SAME), +- stride_d(0), +- stride_w(0), +- stride_h(0), +- fused_activation_function(tflite::ActivationFunctionType_NONE), +- dilation_d_factor(1), +- dilation_w_factor(1), +- dilation_h_factor(1) { +- } ++ tflite::Padding padding = tflite::Padding_SAME; ++ int32_t stride_d = 0; ++ int32_t stride_w = 0; ++ int32_t stride_h = 0; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ int32_t dilation_d_factor = 1; ++ int32_t dilation_w_factor = 1; ++ int32_t dilation_h_factor = 1; + }; + + struct Conv3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Conv3DOptionsT NativeTableType; ++ typedef Conv3DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_D = 6, +@@ -4292,6 +4885,7 @@ struct Conv3DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Conv3DOptionsBuilder { ++ typedef Conv3DOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_padding(tflite::Padding padding) { +@@ -4322,7 +4916,6 @@ struct Conv3DOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Conv3DOptionsBuilder &operator=(const Conv3DOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4356,24 +4949,17 @@ flatbuffers::Offset CreateConv3DOptions(flatbuffers::FlatBufferBu + + struct Pool2DOptionsT : public flatbuffers::NativeTable { + typedef Pool2DOptions TableType; +- tflite::Padding padding; +- int32_t stride_w; +- int32_t stride_h; +- int32_t filter_width; +- int32_t filter_height; +- tflite::ActivationFunctionType fused_activation_function; +- Pool2DOptionsT() +- : padding(tflite::Padding_SAME), +- stride_w(0), +- stride_h(0), +- filter_width(0), +- filter_height(0), +- fused_activation_function(tflite::ActivationFunctionType_NONE) { +- } ++ tflite::Padding padding = tflite::Padding_SAME; ++ int32_t stride_w = 0; ++ int32_t stride_h = 0; ++ int32_t filter_width = 0; ++ int32_t filter_height = 0; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; + }; + + struct Pool2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Pool2DOptionsT NativeTableType; ++ typedef Pool2DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_W = 6, +@@ -4416,6 +5002,7 @@ struct Pool2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Pool2DOptionsBuilder { ++ typedef Pool2DOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_padding(tflite::Padding padding) { +@@ -4440,7 +5027,6 @@ struct Pool2DOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Pool2DOptionsBuilder &operator=(const Pool2DOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4470,26 +5056,18 @@ flatbuffers::Offset CreatePool2DOptions(flatbuffers::FlatBufferBu + + struct DepthwiseConv2DOptionsT : public flatbuffers::NativeTable { + typedef DepthwiseConv2DOptions TableType; +- tflite::Padding padding; +- int32_t stride_w; +- int32_t stride_h; +- int32_t depth_multiplier; +- tflite::ActivationFunctionType fused_activation_function; +- int32_t dilation_w_factor; +- int32_t dilation_h_factor; +- DepthwiseConv2DOptionsT() +- : padding(tflite::Padding_SAME), +- stride_w(0), +- stride_h(0), +- depth_multiplier(0), +- fused_activation_function(tflite::ActivationFunctionType_NONE), +- dilation_w_factor(1), +- dilation_h_factor(1) { +- } ++ tflite::Padding padding = tflite::Padding_SAME; ++ int32_t stride_w = 0; ++ int32_t stride_h = 0; ++ int32_t depth_multiplier = 0; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ int32_t dilation_w_factor = 1; ++ int32_t dilation_h_factor = 1; + }; + + struct DepthwiseConv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DepthwiseConv2DOptionsT NativeTableType; ++ typedef DepthwiseConv2DOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_W = 6, +@@ -4537,6 +5115,7 @@ struct DepthwiseConv2DOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab + }; + + struct DepthwiseConv2DOptionsBuilder { ++ typedef DepthwiseConv2DOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_padding(tflite::Padding padding) { +@@ -4564,7 +5143,6 @@ struct DepthwiseConv2DOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DepthwiseConv2DOptionsBuilder &operator=(const DepthwiseConv2DOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4596,16 +5174,14 @@ flatbuffers::Offset CreateDepthwiseConv2DOptions(flatbuf + + struct ConcatEmbeddingsOptionsT : public flatbuffers::NativeTable { + typedef ConcatEmbeddingsOptions TableType; +- int32_t num_channels; +- std::vector num_columns_per_channel; +- std::vector embedding_dim_per_channel; +- ConcatEmbeddingsOptionsT() +- : num_channels(0) { +- } ++ int32_t num_channels = 0; ++ std::vector num_columns_per_channel{}; ++ std::vector embedding_dim_per_channel{}; + }; + + struct ConcatEmbeddingsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ConcatEmbeddingsOptionsT NativeTableType; ++ typedef ConcatEmbeddingsOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_CHANNELS = 4, + VT_NUM_COLUMNS_PER_CHANNEL = 6, +@@ -4635,6 +5211,7 @@ struct ConcatEmbeddingsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Ta + }; + + struct ConcatEmbeddingsOptionsBuilder { ++ typedef ConcatEmbeddingsOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_num_channels(int32_t num_channels) { +@@ -4650,7 +5227,6 @@ struct ConcatEmbeddingsOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ConcatEmbeddingsOptionsBuilder &operator=(const ConcatEmbeddingsOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4688,14 +5264,12 @@ flatbuffers::Offset CreateConcatEmbeddingsOptions(flatb + + struct LSHProjectionOptionsT : public flatbuffers::NativeTable { + typedef LSHProjectionOptions TableType; +- tflite::LSHProjectionType type; +- LSHProjectionOptionsT() +- : type(tflite::LSHProjectionType_UNKNOWN) { +- } ++ tflite::LSHProjectionType type = tflite::LSHProjectionType_UNKNOWN; + }; + + struct LSHProjectionOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LSHProjectionOptionsT NativeTableType; ++ typedef LSHProjectionOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TYPE = 4 + }; +@@ -4713,6 +5287,7 @@ struct LSHProjectionOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct LSHProjectionOptionsBuilder { ++ typedef LSHProjectionOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_type(tflite::LSHProjectionType type) { +@@ -4722,7 +5297,6 @@ struct LSHProjectionOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LSHProjectionOptionsBuilder &operator=(const LSHProjectionOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4742,18 +5316,14 @@ flatbuffers::Offset CreateLSHProjectionOptions(flatbuffers + + struct SVDFOptionsT : public flatbuffers::NativeTable { + typedef SVDFOptions TableType; +- int32_t rank; +- tflite::ActivationFunctionType fused_activation_function; +- bool asymmetric_quantize_inputs; +- SVDFOptionsT() +- : rank(0), +- fused_activation_function(tflite::ActivationFunctionType_NONE), +- asymmetric_quantize_inputs(false) { +- } ++ int32_t rank = 0; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ bool asymmetric_quantize_inputs = false; + }; + + struct SVDFOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SVDFOptionsT NativeTableType; ++ typedef SVDFOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RANK = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6, +@@ -4781,6 +5351,7 @@ struct SVDFOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SVDFOptionsBuilder { ++ typedef SVDFOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_rank(int32_t rank) { +@@ -4796,7 +5367,6 @@ struct SVDFOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SVDFOptionsBuilder &operator=(const SVDFOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4820,16 +5390,13 @@ flatbuffers::Offset CreateSVDFOptions(flatbuffers::FlatBufferBuilde + + struct RNNOptionsT : public flatbuffers::NativeTable { + typedef RNNOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- bool asymmetric_quantize_inputs; +- RNNOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE), +- asymmetric_quantize_inputs(false) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ bool asymmetric_quantize_inputs = false; + }; + + struct RNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RNNOptionsT NativeTableType; ++ typedef RNNOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_ASYMMETRIC_QUANTIZE_INPUTS = 6 +@@ -4852,6 +5419,7 @@ struct RNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RNNOptionsBuilder { ++ typedef RNNOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -4864,7 +5432,6 @@ struct RNNOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RNNOptionsBuilder &operator=(const RNNOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4886,18 +5453,14 @@ flatbuffers::Offset CreateRNNOptions(flatbuffers::FlatBufferBuilder + + struct SequenceRNNOptionsT : public flatbuffers::NativeTable { + typedef SequenceRNNOptions TableType; +- bool time_major; +- tflite::ActivationFunctionType fused_activation_function; +- bool asymmetric_quantize_inputs; +- SequenceRNNOptionsT() +- : time_major(false), +- fused_activation_function(tflite::ActivationFunctionType_NONE), +- asymmetric_quantize_inputs(false) { +- } ++ bool time_major = false; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ bool asymmetric_quantize_inputs = false; + }; + + struct SequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SequenceRNNOptionsT NativeTableType; ++ typedef SequenceRNNOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TIME_MAJOR = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6, +@@ -4925,6 +5488,7 @@ struct SequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SequenceRNNOptionsBuilder { ++ typedef SequenceRNNOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_time_major(bool time_major) { +@@ -4940,7 +5504,6 @@ struct SequenceRNNOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SequenceRNNOptionsBuilder &operator=(const SequenceRNNOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -4964,20 +5527,15 @@ flatbuffers::Offset CreateSequenceRNNOptions(flatbuffers::Fl + + struct BidirectionalSequenceRNNOptionsT : public flatbuffers::NativeTable { + typedef BidirectionalSequenceRNNOptions TableType; +- bool time_major; +- tflite::ActivationFunctionType fused_activation_function; +- bool merge_outputs; +- bool asymmetric_quantize_inputs; +- BidirectionalSequenceRNNOptionsT() +- : time_major(false), +- fused_activation_function(tflite::ActivationFunctionType_NONE), +- merge_outputs(false), +- asymmetric_quantize_inputs(false) { +- } ++ bool time_major = false; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ bool merge_outputs = false; ++ bool asymmetric_quantize_inputs = false; + }; + + struct BidirectionalSequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BidirectionalSequenceRNNOptionsT NativeTableType; ++ typedef BidirectionalSequenceRNNOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TIME_MAJOR = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6, +@@ -5010,6 +5568,7 @@ struct BidirectionalSequenceRNNOptions FLATBUFFERS_FINAL_CLASS : private flatbuf + }; + + struct BidirectionalSequenceRNNOptionsBuilder { ++ typedef BidirectionalSequenceRNNOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_time_major(bool time_major) { +@@ -5028,7 +5587,6 @@ struct BidirectionalSequenceRNNOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BidirectionalSequenceRNNOptionsBuilder &operator=(const BidirectionalSequenceRNNOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5054,20 +5612,15 @@ flatbuffers::Offset CreateBidirectionalSequence + + struct FullyConnectedOptionsT : public flatbuffers::NativeTable { + typedef FullyConnectedOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- tflite::FullyConnectedOptionsWeightsFormat weights_format; +- bool keep_num_dims; +- bool asymmetric_quantize_inputs; +- FullyConnectedOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE), +- weights_format(tflite::FullyConnectedOptionsWeightsFormat_DEFAULT), +- keep_num_dims(false), +- asymmetric_quantize_inputs(false) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ tflite::FullyConnectedOptionsWeightsFormat weights_format = tflite::FullyConnectedOptionsWeightsFormat_DEFAULT; ++ bool keep_num_dims = false; ++ bool asymmetric_quantize_inputs = false; + }; + + struct FullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FullyConnectedOptionsT NativeTableType; ++ typedef FullyConnectedOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_WEIGHTS_FORMAT = 6, +@@ -5100,6 +5653,7 @@ struct FullyConnectedOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct FullyConnectedOptionsBuilder { ++ typedef FullyConnectedOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -5118,7 +5672,6 @@ struct FullyConnectedOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FullyConnectedOptionsBuilder &operator=(const FullyConnectedOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5144,14 +5697,12 @@ flatbuffers::Offset CreateFullyConnectedOptions(flatbuffe + + struct SoftmaxOptionsT : public flatbuffers::NativeTable { + typedef SoftmaxOptions TableType; +- float beta; +- SoftmaxOptionsT() +- : beta(0.0f) { +- } ++ float beta = 0.0f; + }; + + struct SoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SoftmaxOptionsT NativeTableType; ++ typedef SoftmaxOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BETA = 4 + }; +@@ -5169,6 +5720,7 @@ struct SoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SoftmaxOptionsBuilder { ++ typedef SoftmaxOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_beta(float beta) { +@@ -5178,7 +5730,6 @@ struct SoftmaxOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SoftmaxOptionsBuilder &operator=(const SoftmaxOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5198,16 +5749,13 @@ flatbuffers::Offset CreateSoftmaxOptions(flatbuffers::FlatBuffer + + struct ConcatenationOptionsT : public flatbuffers::NativeTable { + typedef ConcatenationOptions TableType; +- int32_t axis; +- tflite::ActivationFunctionType fused_activation_function; +- ConcatenationOptionsT() +- : axis(0), +- fused_activation_function(tflite::ActivationFunctionType_NONE) { +- } ++ int32_t axis = 0; ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; + }; + + struct ConcatenationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ConcatenationOptionsT NativeTableType; ++ typedef ConcatenationOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_AXIS = 4, + VT_FUSED_ACTIVATION_FUNCTION = 6 +@@ -5230,6 +5778,7 @@ struct ConcatenationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct ConcatenationOptionsBuilder { ++ typedef ConcatenationOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(int32_t axis) { +@@ -5242,7 +5791,6 @@ struct ConcatenationOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ConcatenationOptionsBuilder &operator=(const ConcatenationOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5264,16 +5812,13 @@ flatbuffers::Offset CreateConcatenationOptions(flatbuffers + + struct AddOptionsT : public flatbuffers::NativeTable { + typedef AddOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- bool pot_scale_int16; +- AddOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE), +- pot_scale_int16(true) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ bool pot_scale_int16 = true; + }; + + struct AddOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AddOptionsT NativeTableType; ++ typedef AddOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_POT_SCALE_INT16 = 6 +@@ -5296,6 +5841,7 @@ struct AddOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct AddOptionsBuilder { ++ typedef AddOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -5308,7 +5854,6 @@ struct AddOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- AddOptionsBuilder &operator=(const AddOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5330,14 +5875,12 @@ flatbuffers::Offset CreateAddOptions(flatbuffers::FlatBufferBuilder + + struct MulOptionsT : public flatbuffers::NativeTable { + typedef MulOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- MulOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; + }; + + struct MulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MulOptionsT NativeTableType; ++ typedef MulOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4 + }; +@@ -5355,6 +5898,7 @@ struct MulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MulOptionsBuilder { ++ typedef MulOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -5364,7 +5908,6 @@ struct MulOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MulOptionsBuilder &operator=(const MulOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5384,14 +5927,12 @@ flatbuffers::Offset CreateMulOptions(flatbuffers::FlatBufferBuilder + + struct L2NormOptionsT : public flatbuffers::NativeTable { + typedef L2NormOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- L2NormOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; + }; + + struct L2NormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef L2NormOptionsT NativeTableType; ++ typedef L2NormOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4 + }; +@@ -5409,6 +5950,7 @@ struct L2NormOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct L2NormOptionsBuilder { ++ typedef L2NormOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -5418,7 +5960,6 @@ struct L2NormOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- L2NormOptionsBuilder &operator=(const L2NormOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5438,20 +5979,15 @@ flatbuffers::Offset CreateL2NormOptions(flatbuffers::FlatBufferBu + + struct LocalResponseNormalizationOptionsT : public flatbuffers::NativeTable { + typedef LocalResponseNormalizationOptions TableType; +- int32_t radius; +- float bias; +- float alpha; +- float beta; +- LocalResponseNormalizationOptionsT() +- : radius(0), +- bias(0.0f), +- alpha(0.0f), +- beta(0.0f) { +- } ++ int32_t radius = 0; ++ float bias = 0.0f; ++ float alpha = 0.0f; ++ float beta = 0.0f; + }; + + struct LocalResponseNormalizationOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LocalResponseNormalizationOptionsT NativeTableType; ++ typedef LocalResponseNormalizationOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_RADIUS = 4, + VT_BIAS = 6, +@@ -5484,6 +6020,7 @@ struct LocalResponseNormalizationOptions FLATBUFFERS_FINAL_CLASS : private flatb + }; + + struct LocalResponseNormalizationOptionsBuilder { ++ typedef LocalResponseNormalizationOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_radius(int32_t radius) { +@@ -5502,7 +6039,6 @@ struct LocalResponseNormalizationOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LocalResponseNormalizationOptionsBuilder &operator=(const LocalResponseNormalizationOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5528,22 +6064,16 @@ flatbuffers::Offset CreateLocalResponseNormal + + struct LSTMOptionsT : public flatbuffers::NativeTable { + typedef LSTMOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- float cell_clip; +- float proj_clip; +- tflite::LSTMKernelType kernel_type; +- bool asymmetric_quantize_inputs; +- LSTMOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE), +- cell_clip(0.0f), +- proj_clip(0.0f), +- kernel_type(tflite::LSTMKernelType_FULL), +- asymmetric_quantize_inputs(false) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ float cell_clip = 0.0f; ++ float proj_clip = 0.0f; ++ tflite::LSTMKernelType kernel_type = tflite::LSTMKernelType_FULL; ++ bool asymmetric_quantize_inputs = false; + }; + + struct LSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LSTMOptionsT NativeTableType; ++ typedef LSTMOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_CELL_CLIP = 6, +@@ -5581,6 +6111,7 @@ struct LSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LSTMOptionsBuilder { ++ typedef LSTMOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -5602,7 +6133,6 @@ struct LSTMOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LSTMOptionsBuilder &operator=(const LSTMOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5630,22 +6160,16 @@ flatbuffers::Offset CreateLSTMOptions(flatbuffers::FlatBufferBuilde + + struct UnidirectionalSequenceLSTMOptionsT : public flatbuffers::NativeTable { + typedef UnidirectionalSequenceLSTMOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- float cell_clip; +- float proj_clip; +- bool time_major; +- bool asymmetric_quantize_inputs; +- UnidirectionalSequenceLSTMOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE), +- cell_clip(0.0f), +- proj_clip(0.0f), +- time_major(false), +- asymmetric_quantize_inputs(false) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ float cell_clip = 0.0f; ++ float proj_clip = 0.0f; ++ bool time_major = false; ++ bool asymmetric_quantize_inputs = false; + }; + + struct UnidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnidirectionalSequenceLSTMOptionsT NativeTableType; ++ typedef UnidirectionalSequenceLSTMOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_CELL_CLIP = 6, +@@ -5683,6 +6207,7 @@ struct UnidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatb + }; + + struct UnidirectionalSequenceLSTMOptionsBuilder { ++ typedef UnidirectionalSequenceLSTMOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -5704,7 +6229,6 @@ struct UnidirectionalSequenceLSTMOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- UnidirectionalSequenceLSTMOptionsBuilder &operator=(const UnidirectionalSequenceLSTMOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5732,24 +6256,17 @@ flatbuffers::Offset CreateUnidirectionalSeque + + struct BidirectionalSequenceLSTMOptionsT : public flatbuffers::NativeTable { + typedef BidirectionalSequenceLSTMOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- float cell_clip; +- float proj_clip; +- bool merge_outputs; +- bool time_major; +- bool asymmetric_quantize_inputs; +- BidirectionalSequenceLSTMOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE), +- cell_clip(0.0f), +- proj_clip(0.0f), +- merge_outputs(false), +- time_major(true), +- asymmetric_quantize_inputs(false) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ float cell_clip = 0.0f; ++ float proj_clip = 0.0f; ++ bool merge_outputs = false; ++ bool time_major = true; ++ bool asymmetric_quantize_inputs = false; + }; + + struct BidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BidirectionalSequenceLSTMOptionsT NativeTableType; ++ typedef BidirectionalSequenceLSTMOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_CELL_CLIP = 6, +@@ -5792,6 +6309,7 @@ struct BidirectionalSequenceLSTMOptions FLATBUFFERS_FINAL_CLASS : private flatbu + }; + + struct BidirectionalSequenceLSTMOptionsBuilder { ++ typedef BidirectionalSequenceLSTMOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -5816,7 +6334,6 @@ struct BidirectionalSequenceLSTMOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BidirectionalSequenceLSTMOptionsBuilder &operator=(const BidirectionalSequenceLSTMOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5846,16 +6363,13 @@ flatbuffers::Offset CreateBidirectionalSequenc + + struct ResizeBilinearOptionsT : public flatbuffers::NativeTable { + typedef ResizeBilinearOptions TableType; +- bool align_corners; +- bool half_pixel_centers; +- ResizeBilinearOptionsT() +- : align_corners(false), +- half_pixel_centers(false) { +- } ++ bool align_corners = false; ++ bool half_pixel_centers = false; + }; + + struct ResizeBilinearOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResizeBilinearOptionsT NativeTableType; ++ typedef ResizeBilinearOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALIGN_CORNERS = 8, + VT_HALF_PIXEL_CENTERS = 10 +@@ -5878,6 +6392,7 @@ struct ResizeBilinearOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct ResizeBilinearOptionsBuilder { ++ typedef ResizeBilinearOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_align_corners(bool align_corners) { +@@ -5890,7 +6405,6 @@ struct ResizeBilinearOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ResizeBilinearOptionsBuilder &operator=(const ResizeBilinearOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5912,16 +6426,13 @@ flatbuffers::Offset CreateResizeBilinearOptions(flatbuffe + + struct ResizeNearestNeighborOptionsT : public flatbuffers::NativeTable { + typedef ResizeNearestNeighborOptions TableType; +- bool align_corners; +- bool half_pixel_centers; +- ResizeNearestNeighborOptionsT() +- : align_corners(false), +- half_pixel_centers(false) { +- } ++ bool align_corners = false; ++ bool half_pixel_centers = false; + }; + + struct ResizeNearestNeighborOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ResizeNearestNeighborOptionsT NativeTableType; ++ typedef ResizeNearestNeighborOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALIGN_CORNERS = 4, + VT_HALF_PIXEL_CENTERS = 6 +@@ -5944,6 +6455,7 @@ struct ResizeNearestNeighborOptions FLATBUFFERS_FINAL_CLASS : private flatbuffer + }; + + struct ResizeNearestNeighborOptionsBuilder { ++ typedef ResizeNearestNeighborOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_align_corners(bool align_corners) { +@@ -5956,7 +6468,6 @@ struct ResizeNearestNeighborOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ResizeNearestNeighborOptionsBuilder &operator=(const ResizeNearestNeighborOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -5978,14 +6489,12 @@ flatbuffers::Offset CreateResizeNearestNeighborOpt + + struct CallOptionsT : public flatbuffers::NativeTable { + typedef CallOptions TableType; +- uint32_t subgraph; +- CallOptionsT() +- : subgraph(0) { +- } ++ uint32_t subgraph = 0; + }; + + struct CallOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CallOptionsT NativeTableType; ++ typedef CallOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SUBGRAPH = 4 + }; +@@ -6003,6 +6512,7 @@ struct CallOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CallOptionsBuilder { ++ typedef CallOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_subgraph(uint32_t subgraph) { +@@ -6012,7 +6522,6 @@ struct CallOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CallOptionsBuilder &operator=(const CallOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6032,12 +6541,11 @@ flatbuffers::Offset CreateCallOptions(flatbuffers::FlatBufferBuilde + + struct PadOptionsT : public flatbuffers::NativeTable { + typedef PadOptions TableType; +- PadOptionsT() { +- } + }; + + struct PadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PadOptionsT NativeTableType; ++ typedef PadOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6048,13 +6556,13 @@ struct PadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PadOptionsBuilder { ++ typedef PadOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit PadOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PadOptionsBuilder &operator=(const PadOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6072,12 +6580,11 @@ flatbuffers::Offset CreatePadOptions(flatbuffers::FlatBufferBuilder + + struct PadV2OptionsT : public flatbuffers::NativeTable { + typedef PadV2Options TableType; +- PadV2OptionsT() { +- } + }; + + struct PadV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PadV2OptionsT NativeTableType; ++ typedef PadV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6088,13 +6595,13 @@ struct PadV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PadV2OptionsBuilder { ++ typedef PadV2Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit PadV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PadV2OptionsBuilder &operator=(const PadV2OptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6112,13 +6619,12 @@ flatbuffers::Offset CreatePadV2Options(flatbuffers::FlatBufferBuil + + struct ReshapeOptionsT : public flatbuffers::NativeTable { + typedef ReshapeOptions TableType; +- std::vector new_shape; +- ReshapeOptionsT() { +- } ++ std::vector new_shape{}; + }; + + struct ReshapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReshapeOptionsT NativeTableType; ++ typedef ReshapeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NEW_SHAPE = 4 + }; +@@ -6137,6 +6643,7 @@ struct ReshapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ReshapeOptionsBuilder { ++ typedef ReshapeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_new_shape(flatbuffers::Offset> new_shape) { +@@ -6146,7 +6653,6 @@ struct ReshapeOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReshapeOptionsBuilder &operator=(const ReshapeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6175,12 +6681,11 @@ flatbuffers::Offset CreateReshapeOptions(flatbuffers::FlatBuffer + + struct SpaceToBatchNDOptionsT : public flatbuffers::NativeTable { + typedef SpaceToBatchNDOptions TableType; +- SpaceToBatchNDOptionsT() { +- } + }; + + struct SpaceToBatchNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SpaceToBatchNDOptionsT NativeTableType; ++ typedef SpaceToBatchNDOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6191,13 +6696,13 @@ struct SpaceToBatchNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct SpaceToBatchNDOptionsBuilder { ++ typedef SpaceToBatchNDOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SpaceToBatchNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SpaceToBatchNDOptionsBuilder &operator=(const SpaceToBatchNDOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6215,12 +6720,11 @@ flatbuffers::Offset CreateSpaceToBatchNDOptions(flatbuffe + + struct BatchToSpaceNDOptionsT : public flatbuffers::NativeTable { + typedef BatchToSpaceNDOptions TableType; +- BatchToSpaceNDOptionsT() { +- } + }; + + struct BatchToSpaceNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BatchToSpaceNDOptionsT NativeTableType; ++ typedef BatchToSpaceNDOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6231,13 +6735,13 @@ struct BatchToSpaceNDOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct BatchToSpaceNDOptionsBuilder { ++ typedef BatchToSpaceNDOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit BatchToSpaceNDOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BatchToSpaceNDOptionsBuilder &operator=(const BatchToSpaceNDOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6255,18 +6759,14 @@ flatbuffers::Offset CreateBatchToSpaceNDOptions(flatbuffe + + struct SkipGramOptionsT : public flatbuffers::NativeTable { + typedef SkipGramOptions TableType; +- int32_t ngram_size; +- int32_t max_skip_size; +- bool include_all_ngrams; +- SkipGramOptionsT() +- : ngram_size(0), +- max_skip_size(0), +- include_all_ngrams(false) { +- } ++ int32_t ngram_size = 0; ++ int32_t max_skip_size = 0; ++ bool include_all_ngrams = false; + }; + + struct SkipGramOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SkipGramOptionsT NativeTableType; ++ typedef SkipGramOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NGRAM_SIZE = 4, + VT_MAX_SKIP_SIZE = 6, +@@ -6294,6 +6794,7 @@ struct SkipGramOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SkipGramOptionsBuilder { ++ typedef SkipGramOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_ngram_size(int32_t ngram_size) { +@@ -6309,7 +6810,6 @@ struct SkipGramOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SkipGramOptionsBuilder &operator=(const SkipGramOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6333,14 +6833,12 @@ flatbuffers::Offset CreateSkipGramOptions(flatbuffers::FlatBuff + + struct SpaceToDepthOptionsT : public flatbuffers::NativeTable { + typedef SpaceToDepthOptions TableType; +- int32_t block_size; +- SpaceToDepthOptionsT() +- : block_size(0) { +- } ++ int32_t block_size = 0; + }; + + struct SpaceToDepthOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SpaceToDepthOptionsT NativeTableType; ++ typedef SpaceToDepthOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BLOCK_SIZE = 4 + }; +@@ -6358,6 +6856,7 @@ struct SpaceToDepthOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct SpaceToDepthOptionsBuilder { ++ typedef SpaceToDepthOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_block_size(int32_t block_size) { +@@ -6367,7 +6866,6 @@ struct SpaceToDepthOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SpaceToDepthOptionsBuilder &operator=(const SpaceToDepthOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6387,14 +6885,12 @@ flatbuffers::Offset CreateSpaceToDepthOptions(flatbuffers:: + + struct DepthToSpaceOptionsT : public flatbuffers::NativeTable { + typedef DepthToSpaceOptions TableType; +- int32_t block_size; +- DepthToSpaceOptionsT() +- : block_size(0) { +- } ++ int32_t block_size = 0; + }; + + struct DepthToSpaceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DepthToSpaceOptionsT NativeTableType; ++ typedef DepthToSpaceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BLOCK_SIZE = 4 + }; +@@ -6412,6 +6908,7 @@ struct DepthToSpaceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct DepthToSpaceOptionsBuilder { ++ typedef DepthToSpaceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_block_size(int32_t block_size) { +@@ -6421,7 +6918,6 @@ struct DepthToSpaceOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DepthToSpaceOptionsBuilder &operator=(const DepthToSpaceOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6441,16 +6937,13 @@ flatbuffers::Offset CreateDepthToSpaceOptions(flatbuffers:: + + struct SubOptionsT : public flatbuffers::NativeTable { + typedef SubOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- bool pot_scale_int16; +- SubOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE), +- pot_scale_int16(true) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; ++ bool pot_scale_int16 = true; + }; + + struct SubOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SubOptionsT NativeTableType; ++ typedef SubOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4, + VT_POT_SCALE_INT16 = 6 +@@ -6473,6 +6966,7 @@ struct SubOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SubOptionsBuilder { ++ typedef SubOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -6485,7 +6979,6 @@ struct SubOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SubOptionsBuilder &operator=(const SubOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6507,14 +7000,12 @@ flatbuffers::Offset CreateSubOptions(flatbuffers::FlatBufferBuilder + + struct DivOptionsT : public flatbuffers::NativeTable { + typedef DivOptions TableType; +- tflite::ActivationFunctionType fused_activation_function; +- DivOptionsT() +- : fused_activation_function(tflite::ActivationFunctionType_NONE) { +- } ++ tflite::ActivationFunctionType fused_activation_function = tflite::ActivationFunctionType_NONE; + }; + + struct DivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DivOptionsT NativeTableType; ++ typedef DivOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_FUSED_ACTIVATION_FUNCTION = 4 + }; +@@ -6532,6 +7023,7 @@ struct DivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct DivOptionsBuilder { ++ typedef DivOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_fused_activation_function(tflite::ActivationFunctionType fused_activation_function) { +@@ -6541,7 +7033,6 @@ struct DivOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DivOptionsBuilder &operator=(const DivOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6561,12 +7052,11 @@ flatbuffers::Offset CreateDivOptions(flatbuffers::FlatBufferBuilder + + struct TopKV2OptionsT : public flatbuffers::NativeTable { + typedef TopKV2Options TableType; +- TopKV2OptionsT() { +- } + }; + + struct TopKV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TopKV2OptionsT NativeTableType; ++ typedef TopKV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6577,13 +7067,13 @@ struct TopKV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TopKV2OptionsBuilder { ++ typedef TopKV2Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit TopKV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TopKV2OptionsBuilder &operator=(const TopKV2OptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6601,14 +7091,12 @@ flatbuffers::Offset CreateTopKV2Options(flatbuffers::FlatBufferBu + + struct EmbeddingLookupSparseOptionsT : public flatbuffers::NativeTable { + typedef EmbeddingLookupSparseOptions TableType; +- tflite::CombinerType combiner; +- EmbeddingLookupSparseOptionsT() +- : combiner(tflite::CombinerType_SUM) { +- } ++ tflite::CombinerType combiner = tflite::CombinerType_SUM; + }; + + struct EmbeddingLookupSparseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EmbeddingLookupSparseOptionsT NativeTableType; ++ typedef EmbeddingLookupSparseOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_COMBINER = 4 + }; +@@ -6626,6 +7114,7 @@ struct EmbeddingLookupSparseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffer + }; + + struct EmbeddingLookupSparseOptionsBuilder { ++ typedef EmbeddingLookupSparseOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_combiner(tflite::CombinerType combiner) { +@@ -6635,7 +7124,6 @@ struct EmbeddingLookupSparseOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- EmbeddingLookupSparseOptionsBuilder &operator=(const EmbeddingLookupSparseOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6655,16 +7143,13 @@ flatbuffers::Offset CreateEmbeddingLookupSparseOpt + + struct GatherOptionsT : public flatbuffers::NativeTable { + typedef GatherOptions TableType; +- int32_t axis; +- int32_t batch_dims; +- GatherOptionsT() +- : axis(0), +- batch_dims(0) { +- } ++ int32_t axis = 0; ++ int32_t batch_dims = 0; + }; + + struct GatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GatherOptionsT NativeTableType; ++ typedef GatherOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_AXIS = 4, + VT_BATCH_DIMS = 6 +@@ -6687,6 +7172,7 @@ struct GatherOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GatherOptionsBuilder { ++ typedef GatherOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(int32_t axis) { +@@ -6699,7 +7185,6 @@ struct GatherOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GatherOptionsBuilder &operator=(const GatherOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6721,12 +7206,11 @@ flatbuffers::Offset CreateGatherOptions(flatbuffers::FlatBufferBu + + struct TransposeOptionsT : public flatbuffers::NativeTable { + typedef TransposeOptions TableType; +- TransposeOptionsT() { +- } + }; + + struct TransposeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TransposeOptionsT NativeTableType; ++ typedef TransposeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6737,13 +7221,13 @@ struct TransposeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TransposeOptionsBuilder { ++ typedef TransposeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit TransposeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TransposeOptionsBuilder &operator=(const TransposeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6761,12 +7245,11 @@ flatbuffers::Offset CreateTransposeOptions(flatbuffers::FlatBu + + struct ExpOptionsT : public flatbuffers::NativeTable { + typedef ExpOptions TableType; +- ExpOptionsT() { +- } + }; + + struct ExpOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ExpOptionsT NativeTableType; ++ typedef ExpOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6777,13 +7260,13 @@ struct ExpOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ExpOptionsBuilder { ++ typedef ExpOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ExpOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ExpOptionsBuilder &operator=(const ExpOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6801,12 +7284,11 @@ flatbuffers::Offset CreateExpOptions(flatbuffers::FlatBufferBuilder + + struct CosOptionsT : public flatbuffers::NativeTable { + typedef CosOptions TableType; +- CosOptionsT() { +- } + }; + + struct CosOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CosOptionsT NativeTableType; ++ typedef CosOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -6817,13 +7299,13 @@ struct CosOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CosOptionsBuilder { ++ typedef CosOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit CosOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CosOptionsBuilder &operator=(const CosOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6841,14 +7323,12 @@ flatbuffers::Offset CreateCosOptions(flatbuffers::FlatBufferBuilder + + struct ReducerOptionsT : public flatbuffers::NativeTable { + typedef ReducerOptions TableType; +- bool keep_dims; +- ReducerOptionsT() +- : keep_dims(false) { +- } ++ bool keep_dims = false; + }; + + struct ReducerOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReducerOptionsT NativeTableType; ++ typedef ReducerOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_KEEP_DIMS = 4 + }; +@@ -6866,6 +7346,7 @@ struct ReducerOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ReducerOptionsBuilder { ++ typedef ReducerOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_keep_dims(bool keep_dims) { +@@ -6875,7 +7356,6 @@ struct ReducerOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReducerOptionsBuilder &operator=(const ReducerOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6895,13 +7375,12 @@ flatbuffers::Offset CreateReducerOptions(flatbuffers::FlatBuffer + + struct SqueezeOptionsT : public flatbuffers::NativeTable { + typedef SqueezeOptions TableType; +- std::vector squeeze_dims; +- SqueezeOptionsT() { +- } ++ std::vector squeeze_dims{}; + }; + + struct SqueezeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SqueezeOptionsT NativeTableType; ++ typedef SqueezeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SQUEEZE_DIMS = 4 + }; +@@ -6920,6 +7399,7 @@ struct SqueezeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SqueezeOptionsBuilder { ++ typedef SqueezeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_squeeze_dims(flatbuffers::Offset> squeeze_dims) { +@@ -6929,7 +7409,6 @@ struct SqueezeOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SqueezeOptionsBuilder &operator=(const SqueezeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -6958,14 +7437,12 @@ flatbuffers::Offset CreateSqueezeOptions(flatbuffers::FlatBuffer + + struct SplitOptionsT : public flatbuffers::NativeTable { + typedef SplitOptions TableType; +- int32_t num_splits; +- SplitOptionsT() +- : num_splits(0) { +- } ++ int32_t num_splits = 0; + }; + + struct SplitOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SplitOptionsT NativeTableType; ++ typedef SplitOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_SPLITS = 4 + }; +@@ -6983,6 +7460,7 @@ struct SplitOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SplitOptionsBuilder { ++ typedef SplitOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_num_splits(int32_t num_splits) { +@@ -6992,7 +7470,6 @@ struct SplitOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SplitOptionsBuilder &operator=(const SplitOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7012,14 +7489,12 @@ flatbuffers::Offset CreateSplitOptions(flatbuffers::FlatBufferBuil + + struct SplitVOptionsT : public flatbuffers::NativeTable { + typedef SplitVOptions TableType; +- int32_t num_splits; +- SplitVOptionsT() +- : num_splits(0) { +- } ++ int32_t num_splits = 0; + }; + + struct SplitVOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SplitVOptionsT NativeTableType; ++ typedef SplitVOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM_SPLITS = 4 + }; +@@ -7037,6 +7512,7 @@ struct SplitVOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SplitVOptionsBuilder { ++ typedef SplitVOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_num_splits(int32_t num_splits) { +@@ -7046,7 +7522,6 @@ struct SplitVOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SplitVOptionsBuilder &operator=(const SplitVOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7066,22 +7541,16 @@ flatbuffers::Offset CreateSplitVOptions(flatbuffers::FlatBufferBu + + struct StridedSliceOptionsT : public flatbuffers::NativeTable { + typedef StridedSliceOptions TableType; +- int32_t begin_mask; +- int32_t end_mask; +- int32_t ellipsis_mask; +- int32_t new_axis_mask; +- int32_t shrink_axis_mask; +- StridedSliceOptionsT() +- : begin_mask(0), +- end_mask(0), +- ellipsis_mask(0), +- new_axis_mask(0), +- shrink_axis_mask(0) { +- } ++ int32_t begin_mask = 0; ++ int32_t end_mask = 0; ++ int32_t ellipsis_mask = 0; ++ int32_t new_axis_mask = 0; ++ int32_t shrink_axis_mask = 0; + }; + + struct StridedSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef StridedSliceOptionsT NativeTableType; ++ typedef StridedSliceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BEGIN_MASK = 4, + VT_END_MASK = 6, +@@ -7119,6 +7588,7 @@ struct StridedSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct StridedSliceOptionsBuilder { ++ typedef StridedSliceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_begin_mask(int32_t begin_mask) { +@@ -7140,7 +7610,6 @@ struct StridedSliceOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- StridedSliceOptionsBuilder &operator=(const StridedSliceOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7168,12 +7637,11 @@ flatbuffers::Offset CreateStridedSliceOptions(flatbuffers:: + + struct LogSoftmaxOptionsT : public flatbuffers::NativeTable { + typedef LogSoftmaxOptions TableType; +- LogSoftmaxOptionsT() { +- } + }; + + struct LogSoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogSoftmaxOptionsT NativeTableType; ++ typedef LogSoftmaxOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7184,13 +7652,13 @@ struct LogSoftmaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LogSoftmaxOptionsBuilder { ++ typedef LogSoftmaxOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LogSoftmaxOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LogSoftmaxOptionsBuilder &operator=(const LogSoftmaxOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7208,16 +7676,13 @@ flatbuffers::Offset CreateLogSoftmaxOptions(flatbuffers::Flat + + struct CastOptionsT : public flatbuffers::NativeTable { + typedef CastOptions TableType; +- tflite::TensorType in_data_type; +- tflite::TensorType out_data_type; +- CastOptionsT() +- : in_data_type(tflite::TensorType_FLOAT32), +- out_data_type(tflite::TensorType_FLOAT32) { +- } ++ tflite::TensorType in_data_type = tflite::TensorType_FLOAT32; ++ tflite::TensorType out_data_type = tflite::TensorType_FLOAT32; + }; + + struct CastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CastOptionsT NativeTableType; ++ typedef CastOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IN_DATA_TYPE = 4, + VT_OUT_DATA_TYPE = 6 +@@ -7240,6 +7705,7 @@ struct CastOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CastOptionsBuilder { ++ typedef CastOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_in_data_type(tflite::TensorType in_data_type) { +@@ -7252,7 +7718,6 @@ struct CastOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CastOptionsBuilder &operator=(const CastOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7274,12 +7739,11 @@ flatbuffers::Offset CreateCastOptions(flatbuffers::FlatBufferBuilde + + struct DequantizeOptionsT : public flatbuffers::NativeTable { + typedef DequantizeOptions TableType; +- DequantizeOptionsT() { +- } + }; + + struct DequantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DequantizeOptionsT NativeTableType; ++ typedef DequantizeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7290,13 +7754,13 @@ struct DequantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct DequantizeOptionsBuilder { ++ typedef DequantizeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit DequantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DequantizeOptionsBuilder &operator=(const DequantizeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7314,12 +7778,11 @@ flatbuffers::Offset CreateDequantizeOptions(flatbuffers::Flat + + struct MaximumMinimumOptionsT : public flatbuffers::NativeTable { + typedef MaximumMinimumOptions TableType; +- MaximumMinimumOptionsT() { +- } + }; + + struct MaximumMinimumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MaximumMinimumOptionsT NativeTableType; ++ typedef MaximumMinimumOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7330,13 +7793,13 @@ struct MaximumMinimumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct MaximumMinimumOptionsBuilder { ++ typedef MaximumMinimumOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit MaximumMinimumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MaximumMinimumOptionsBuilder &operator=(const MaximumMinimumOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7354,12 +7817,11 @@ flatbuffers::Offset CreateMaximumMinimumOptions(flatbuffe + + struct TileOptionsT : public flatbuffers::NativeTable { + typedef TileOptions TableType; +- TileOptionsT() { +- } + }; + + struct TileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TileOptionsT NativeTableType; ++ typedef TileOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7370,13 +7832,13 @@ struct TileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TileOptionsBuilder { ++ typedef TileOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit TileOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TileOptionsBuilder &operator=(const TileOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7394,14 +7856,12 @@ flatbuffers::Offset CreateTileOptions(flatbuffers::FlatBufferBuilde + + struct ArgMaxOptionsT : public flatbuffers::NativeTable { + typedef ArgMaxOptions TableType; +- tflite::TensorType output_type; +- ArgMaxOptionsT() +- : output_type(tflite::TensorType_FLOAT32) { +- } ++ tflite::TensorType output_type = tflite::TensorType_FLOAT32; + }; + + struct ArgMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ArgMaxOptionsT NativeTableType; ++ typedef ArgMaxOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OUTPUT_TYPE = 4 + }; +@@ -7419,6 +7879,7 @@ struct ArgMaxOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ArgMaxOptionsBuilder { ++ typedef ArgMaxOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_output_type(tflite::TensorType output_type) { +@@ -7428,7 +7889,6 @@ struct ArgMaxOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ArgMaxOptionsBuilder &operator=(const ArgMaxOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7448,14 +7908,12 @@ flatbuffers::Offset CreateArgMaxOptions(flatbuffers::FlatBufferBu + + struct ArgMinOptionsT : public flatbuffers::NativeTable { + typedef ArgMinOptions TableType; +- tflite::TensorType output_type; +- ArgMinOptionsT() +- : output_type(tflite::TensorType_FLOAT32) { +- } ++ tflite::TensorType output_type = tflite::TensorType_FLOAT32; + }; + + struct ArgMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ArgMinOptionsT NativeTableType; ++ typedef ArgMinOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OUTPUT_TYPE = 4 + }; +@@ -7473,6 +7931,7 @@ struct ArgMinOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ArgMinOptionsBuilder { ++ typedef ArgMinOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_output_type(tflite::TensorType output_type) { +@@ -7482,7 +7941,6 @@ struct ArgMinOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ArgMinOptionsBuilder &operator=(const ArgMinOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7502,12 +7960,11 @@ flatbuffers::Offset CreateArgMinOptions(flatbuffers::FlatBufferBu + + struct GreaterOptionsT : public flatbuffers::NativeTable { + typedef GreaterOptions TableType; +- GreaterOptionsT() { +- } + }; + + struct GreaterOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GreaterOptionsT NativeTableType; ++ typedef GreaterOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7518,13 +7975,13 @@ struct GreaterOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GreaterOptionsBuilder { ++ typedef GreaterOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit GreaterOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GreaterOptionsBuilder &operator=(const GreaterOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7542,12 +7999,11 @@ flatbuffers::Offset CreateGreaterOptions(flatbuffers::FlatBuffer + + struct GreaterEqualOptionsT : public flatbuffers::NativeTable { + typedef GreaterEqualOptions TableType; +- GreaterEqualOptionsT() { +- } + }; + + struct GreaterEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GreaterEqualOptionsT NativeTableType; ++ typedef GreaterEqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7558,13 +8014,13 @@ struct GreaterEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct GreaterEqualOptionsBuilder { ++ typedef GreaterEqualOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit GreaterEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GreaterEqualOptionsBuilder &operator=(const GreaterEqualOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7582,12 +8038,11 @@ flatbuffers::Offset CreateGreaterEqualOptions(flatbuffers:: + + struct LessOptionsT : public flatbuffers::NativeTable { + typedef LessOptions TableType; +- LessOptionsT() { +- } + }; + + struct LessOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LessOptionsT NativeTableType; ++ typedef LessOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7598,13 +8053,13 @@ struct LessOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LessOptionsBuilder { ++ typedef LessOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LessOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LessOptionsBuilder &operator=(const LessOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7622,12 +8077,11 @@ flatbuffers::Offset CreateLessOptions(flatbuffers::FlatBufferBuilde + + struct LessEqualOptionsT : public flatbuffers::NativeTable { + typedef LessEqualOptions TableType; +- LessEqualOptionsT() { +- } + }; + + struct LessEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LessEqualOptionsT NativeTableType; ++ typedef LessEqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7638,13 +8092,13 @@ struct LessEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LessEqualOptionsBuilder { ++ typedef LessEqualOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LessEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LessEqualOptionsBuilder &operator=(const LessEqualOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7662,12 +8116,11 @@ flatbuffers::Offset CreateLessEqualOptions(flatbuffers::FlatBu + + struct NegOptionsT : public flatbuffers::NativeTable { + typedef NegOptions TableType; +- NegOptionsT() { +- } + }; + + struct NegOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NegOptionsT NativeTableType; ++ typedef NegOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7678,13 +8131,13 @@ struct NegOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct NegOptionsBuilder { ++ typedef NegOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit NegOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NegOptionsBuilder &operator=(const NegOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7702,12 +8155,11 @@ flatbuffers::Offset CreateNegOptions(flatbuffers::FlatBufferBuilder + + struct SelectOptionsT : public flatbuffers::NativeTable { + typedef SelectOptions TableType; +- SelectOptionsT() { +- } + }; + + struct SelectOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SelectOptionsT NativeTableType; ++ typedef SelectOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7718,13 +8170,13 @@ struct SelectOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SelectOptionsBuilder { ++ typedef SelectOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SelectOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SelectOptionsBuilder &operator=(const SelectOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7742,12 +8194,11 @@ flatbuffers::Offset CreateSelectOptions(flatbuffers::FlatBufferBu + + struct SliceOptionsT : public flatbuffers::NativeTable { + typedef SliceOptions TableType; +- SliceOptionsT() { +- } + }; + + struct SliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SliceOptionsT NativeTableType; ++ typedef SliceOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7758,13 +8209,13 @@ struct SliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SliceOptionsBuilder { ++ typedef SliceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SliceOptionsBuilder &operator=(const SliceOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7782,18 +8233,14 @@ flatbuffers::Offset CreateSliceOptions(flatbuffers::FlatBufferBuil + + struct TransposeConvOptionsT : public flatbuffers::NativeTable { + typedef TransposeConvOptions TableType; +- tflite::Padding padding; +- int32_t stride_w; +- int32_t stride_h; +- TransposeConvOptionsT() +- : padding(tflite::Padding_SAME), +- stride_w(0), +- stride_h(0) { +- } ++ tflite::Padding padding = tflite::Padding_SAME; ++ int32_t stride_w = 0; ++ int32_t stride_h = 0; + }; + + struct TransposeConvOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TransposeConvOptionsT NativeTableType; ++ typedef TransposeConvOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_PADDING = 4, + VT_STRIDE_W = 6, +@@ -7821,6 +8268,7 @@ struct TransposeConvOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct TransposeConvOptionsBuilder { ++ typedef TransposeConvOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_padding(tflite::Padding padding) { +@@ -7836,7 +8284,6 @@ struct TransposeConvOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TransposeConvOptionsBuilder &operator=(const TransposeConvOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7860,12 +8307,11 @@ flatbuffers::Offset CreateTransposeConvOptions(flatbuffers + + struct ExpandDimsOptionsT : public flatbuffers::NativeTable { + typedef ExpandDimsOptions TableType; +- ExpandDimsOptionsT() { +- } + }; + + struct ExpandDimsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ExpandDimsOptionsT NativeTableType; ++ typedef ExpandDimsOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7876,13 +8322,13 @@ struct ExpandDimsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ExpandDimsOptionsBuilder { ++ typedef ExpandDimsOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ExpandDimsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ExpandDimsOptionsBuilder &operator=(const ExpandDimsOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7900,14 +8346,12 @@ flatbuffers::Offset CreateExpandDimsOptions(flatbuffers::Flat + + struct SparseToDenseOptionsT : public flatbuffers::NativeTable { + typedef SparseToDenseOptions TableType; +- bool validate_indices; +- SparseToDenseOptionsT() +- : validate_indices(false) { +- } ++ bool validate_indices = false; + }; + + struct SparseToDenseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SparseToDenseOptionsT NativeTableType; ++ typedef SparseToDenseOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALIDATE_INDICES = 4 + }; +@@ -7925,6 +8369,7 @@ struct SparseToDenseOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct SparseToDenseOptionsBuilder { ++ typedef SparseToDenseOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_validate_indices(bool validate_indices) { +@@ -7934,7 +8379,6 @@ struct SparseToDenseOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SparseToDenseOptionsBuilder &operator=(const SparseToDenseOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7954,12 +8398,11 @@ flatbuffers::Offset CreateSparseToDenseOptions(flatbuffers + + struct EqualOptionsT : public flatbuffers::NativeTable { + typedef EqualOptions TableType; +- EqualOptionsT() { +- } + }; + + struct EqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef EqualOptionsT NativeTableType; ++ typedef EqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -7970,13 +8413,13 @@ struct EqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct EqualOptionsBuilder { ++ typedef EqualOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit EqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- EqualOptionsBuilder &operator=(const EqualOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -7994,12 +8437,11 @@ flatbuffers::Offset CreateEqualOptions(flatbuffers::FlatBufferBuil + + struct NotEqualOptionsT : public flatbuffers::NativeTable { + typedef NotEqualOptions TableType; +- NotEqualOptionsT() { +- } + }; + + struct NotEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NotEqualOptionsT NativeTableType; ++ typedef NotEqualOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8010,13 +8452,13 @@ struct NotEqualOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct NotEqualOptionsBuilder { ++ typedef NotEqualOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit NotEqualOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NotEqualOptionsBuilder &operator=(const NotEqualOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8034,14 +8476,12 @@ flatbuffers::Offset CreateNotEqualOptions(flatbuffers::FlatBuff + + struct ShapeOptionsT : public flatbuffers::NativeTable { + typedef ShapeOptions TableType; +- tflite::TensorType out_type; +- ShapeOptionsT() +- : out_type(tflite::TensorType_FLOAT32) { +- } ++ tflite::TensorType out_type = tflite::TensorType_FLOAT32; + }; + + struct ShapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ShapeOptionsT NativeTableType; ++ typedef ShapeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OUT_TYPE = 4 + }; +@@ -8059,6 +8499,7 @@ struct ShapeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ShapeOptionsBuilder { ++ typedef ShapeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_out_type(tflite::TensorType out_type) { +@@ -8068,7 +8509,6 @@ struct ShapeOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ShapeOptionsBuilder &operator=(const ShapeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8088,12 +8528,11 @@ flatbuffers::Offset CreateShapeOptions(flatbuffers::FlatBufferBuil + + struct RankOptionsT : public flatbuffers::NativeTable { + typedef RankOptions TableType; +- RankOptionsT() { +- } + }; + + struct RankOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RankOptionsT NativeTableType; ++ typedef RankOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8104,13 +8543,13 @@ struct RankOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RankOptionsBuilder { ++ typedef RankOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit RankOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RankOptionsBuilder &operator=(const RankOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8128,12 +8567,11 @@ flatbuffers::Offset CreateRankOptions(flatbuffers::FlatBufferBuilde + + struct PowOptionsT : public flatbuffers::NativeTable { + typedef PowOptions TableType; +- PowOptionsT() { +- } + }; + + struct PowOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PowOptionsT NativeTableType; ++ typedef PowOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8144,13 +8582,13 @@ struct PowOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PowOptionsBuilder { ++ typedef PowOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit PowOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PowOptionsBuilder &operator=(const PowOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8168,20 +8606,15 @@ flatbuffers::Offset CreatePowOptions(flatbuffers::FlatBufferBuilder + + struct FakeQuantOptionsT : public flatbuffers::NativeTable { + typedef FakeQuantOptions TableType; +- float min; +- float max; +- int32_t num_bits; +- bool narrow_range; +- FakeQuantOptionsT() +- : min(0.0f), +- max(0.0f), +- num_bits(0), +- narrow_range(false) { +- } ++ float min = 0.0f; ++ float max = 0.0f; ++ int32_t num_bits = 0; ++ bool narrow_range = false; + }; + + struct FakeQuantOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FakeQuantOptionsT NativeTableType; ++ typedef FakeQuantOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MIN = 4, + VT_MAX = 6, +@@ -8214,6 +8647,7 @@ struct FakeQuantOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct FakeQuantOptionsBuilder { ++ typedef FakeQuantOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_min(float min) { +@@ -8232,7 +8666,6 @@ struct FakeQuantOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FakeQuantOptionsBuilder &operator=(const FakeQuantOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8258,16 +8691,13 @@ flatbuffers::Offset CreateFakeQuantOptions(flatbuffers::FlatBu + + struct PackOptionsT : public flatbuffers::NativeTable { + typedef PackOptions TableType; +- int32_t values_count; +- int32_t axis; +- PackOptionsT() +- : values_count(0), +- axis(0) { +- } ++ int32_t values_count = 0; ++ int32_t axis = 0; + }; + + struct PackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef PackOptionsT NativeTableType; ++ typedef PackOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VALUES_COUNT = 4, + VT_AXIS = 6 +@@ -8290,6 +8720,7 @@ struct PackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct PackOptionsBuilder { ++ typedef PackOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_values_count(int32_t values_count) { +@@ -8302,7 +8733,6 @@ struct PackOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- PackOptionsBuilder &operator=(const PackOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8324,12 +8754,11 @@ flatbuffers::Offset CreatePackOptions(flatbuffers::FlatBufferBuilde + + struct LogicalOrOptionsT : public flatbuffers::NativeTable { + typedef LogicalOrOptions TableType; +- LogicalOrOptionsT() { +- } + }; + + struct LogicalOrOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogicalOrOptionsT NativeTableType; ++ typedef LogicalOrOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8340,13 +8769,13 @@ struct LogicalOrOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LogicalOrOptionsBuilder { ++ typedef LogicalOrOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LogicalOrOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LogicalOrOptionsBuilder &operator=(const LogicalOrOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8364,14 +8793,12 @@ flatbuffers::Offset CreateLogicalOrOptions(flatbuffers::FlatBu + + struct OneHotOptionsT : public flatbuffers::NativeTable { + typedef OneHotOptions TableType; +- int32_t axis; +- OneHotOptionsT() +- : axis(0) { +- } ++ int32_t axis = 0; + }; + + struct OneHotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OneHotOptionsT NativeTableType; ++ typedef OneHotOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_AXIS = 4 + }; +@@ -8389,6 +8816,7 @@ struct OneHotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct OneHotOptionsBuilder { ++ typedef OneHotOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_axis(int32_t axis) { +@@ -8398,7 +8826,6 @@ struct OneHotOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- OneHotOptionsBuilder &operator=(const OneHotOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8418,12 +8845,11 @@ flatbuffers::Offset CreateOneHotOptions(flatbuffers::FlatBufferBu + + struct AbsOptionsT : public flatbuffers::NativeTable { + typedef AbsOptions TableType; +- AbsOptionsT() { +- } + }; + + struct AbsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AbsOptionsT NativeTableType; ++ typedef AbsOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8434,13 +8860,13 @@ struct AbsOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct AbsOptionsBuilder { ++ typedef AbsOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AbsOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- AbsOptionsBuilder &operator=(const AbsOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8458,12 +8884,11 @@ flatbuffers::Offset CreateAbsOptions(flatbuffers::FlatBufferBuilder + + struct HardSwishOptionsT : public flatbuffers::NativeTable { + typedef HardSwishOptions TableType; +- HardSwishOptionsT() { +- } + }; + + struct HardSwishOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HardSwishOptionsT NativeTableType; ++ typedef HardSwishOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8474,13 +8899,13 @@ struct HardSwishOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct HardSwishOptionsBuilder { ++ typedef HardSwishOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HardSwishOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- HardSwishOptionsBuilder &operator=(const HardSwishOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8498,12 +8923,11 @@ flatbuffers::Offset CreateHardSwishOptions(flatbuffers::FlatBu + + struct LogicalAndOptionsT : public flatbuffers::NativeTable { + typedef LogicalAndOptions TableType; +- LogicalAndOptionsT() { +- } + }; + + struct LogicalAndOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogicalAndOptionsT NativeTableType; ++ typedef LogicalAndOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8514,13 +8938,13 @@ struct LogicalAndOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LogicalAndOptionsBuilder { ++ typedef LogicalAndOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LogicalAndOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LogicalAndOptionsBuilder &operator=(const LogicalAndOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8538,12 +8962,11 @@ flatbuffers::Offset CreateLogicalAndOptions(flatbuffers::Flat + + struct LogicalNotOptionsT : public flatbuffers::NativeTable { + typedef LogicalNotOptions TableType; +- LogicalNotOptionsT() { +- } + }; + + struct LogicalNotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LogicalNotOptionsT NativeTableType; ++ typedef LogicalNotOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8554,13 +8977,13 @@ struct LogicalNotOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LogicalNotOptionsBuilder { ++ typedef LogicalNotOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit LogicalNotOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LogicalNotOptionsBuilder &operator=(const LogicalNotOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8578,16 +9001,13 @@ flatbuffers::Offset CreateLogicalNotOptions(flatbuffers::Flat + + struct UnpackOptionsT : public flatbuffers::NativeTable { + typedef UnpackOptions TableType; +- int32_t num; +- int32_t axis; +- UnpackOptionsT() +- : num(0), +- axis(0) { +- } ++ int32_t num = 0; ++ int32_t axis = 0; + }; + + struct UnpackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UnpackOptionsT NativeTableType; ++ typedef UnpackOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NUM = 4, + VT_AXIS = 6 +@@ -8610,6 +9030,7 @@ struct UnpackOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct UnpackOptionsBuilder { ++ typedef UnpackOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_num(int32_t num) { +@@ -8622,7 +9043,6 @@ struct UnpackOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- UnpackOptionsBuilder &operator=(const UnpackOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8644,12 +9064,11 @@ flatbuffers::Offset CreateUnpackOptions(flatbuffers::FlatBufferBu + + struct FloorDivOptionsT : public flatbuffers::NativeTable { + typedef FloorDivOptions TableType; +- FloorDivOptionsT() { +- } + }; + + struct FloorDivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FloorDivOptionsT NativeTableType; ++ typedef FloorDivOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8660,13 +9079,13 @@ struct FloorDivOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct FloorDivOptionsBuilder { ++ typedef FloorDivOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FloorDivOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FloorDivOptionsBuilder &operator=(const FloorDivOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8684,12 +9103,11 @@ flatbuffers::Offset CreateFloorDivOptions(flatbuffers::FlatBuff + + struct SquareOptionsT : public flatbuffers::NativeTable { + typedef SquareOptions TableType; +- SquareOptionsT() { +- } + }; + + struct SquareOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SquareOptionsT NativeTableType; ++ typedef SquareOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8700,13 +9118,13 @@ struct SquareOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SquareOptionsBuilder { ++ typedef SquareOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SquareOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SquareOptionsBuilder &operator=(const SquareOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8724,12 +9142,11 @@ flatbuffers::Offset CreateSquareOptions(flatbuffers::FlatBufferBu + + struct ZerosLikeOptionsT : public flatbuffers::NativeTable { + typedef ZerosLikeOptions TableType; +- ZerosLikeOptionsT() { +- } + }; + + struct ZerosLikeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ZerosLikeOptionsT NativeTableType; ++ typedef ZerosLikeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8740,13 +9157,13 @@ struct ZerosLikeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ZerosLikeOptionsBuilder { ++ typedef ZerosLikeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ZerosLikeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ZerosLikeOptionsBuilder &operator=(const ZerosLikeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8764,12 +9181,11 @@ flatbuffers::Offset CreateZerosLikeOptions(flatbuffers::FlatBu + + struct FillOptionsT : public flatbuffers::NativeTable { + typedef FillOptions TableType; +- FillOptionsT() { +- } + }; + + struct FillOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FillOptionsT NativeTableType; ++ typedef FillOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8780,13 +9196,13 @@ struct FillOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct FillOptionsBuilder { ++ typedef FillOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FillOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FillOptionsBuilder &operator=(const FillOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8804,12 +9220,11 @@ flatbuffers::Offset CreateFillOptions(flatbuffers::FlatBufferBuilde + + struct FloorModOptionsT : public flatbuffers::NativeTable { + typedef FloorModOptions TableType; +- FloorModOptionsT() { +- } + }; + + struct FloorModOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef FloorModOptionsT NativeTableType; ++ typedef FloorModOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8820,13 +9235,13 @@ struct FloorModOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct FloorModOptionsBuilder { ++ typedef FloorModOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit FloorModOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- FloorModOptionsBuilder &operator=(const FloorModOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8844,12 +9259,11 @@ flatbuffers::Offset CreateFloorModOptions(flatbuffers::FlatBuff + + struct RangeOptionsT : public flatbuffers::NativeTable { + typedef RangeOptions TableType; +- RangeOptionsT() { +- } + }; + + struct RangeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RangeOptionsT NativeTableType; ++ typedef RangeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8860,13 +9274,13 @@ struct RangeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RangeOptionsBuilder { ++ typedef RangeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit RangeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RangeOptionsBuilder &operator=(const RangeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8884,14 +9298,12 @@ flatbuffers::Offset CreateRangeOptions(flatbuffers::FlatBufferBuil + + struct LeakyReluOptionsT : public flatbuffers::NativeTable { + typedef LeakyReluOptions TableType; +- float alpha; +- LeakyReluOptionsT() +- : alpha(0.0f) { +- } ++ float alpha = 0.0f; + }; + + struct LeakyReluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef LeakyReluOptionsT NativeTableType; ++ typedef LeakyReluOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ALPHA = 4 + }; +@@ -8909,6 +9321,7 @@ struct LeakyReluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct LeakyReluOptionsBuilder { ++ typedef LeakyReluOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_alpha(float alpha) { +@@ -8918,7 +9331,6 @@ struct LeakyReluOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- LeakyReluOptionsBuilder &operator=(const LeakyReluOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8938,12 +9350,11 @@ flatbuffers::Offset CreateLeakyReluOptions(flatbuffers::FlatBu + + struct SquaredDifferenceOptionsT : public flatbuffers::NativeTable { + typedef SquaredDifferenceOptions TableType; +- SquaredDifferenceOptionsT() { +- } + }; + + struct SquaredDifferenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SquaredDifferenceOptionsT NativeTableType; ++ typedef SquaredDifferenceOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -8954,13 +9365,13 @@ struct SquaredDifferenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::T + }; + + struct SquaredDifferenceOptionsBuilder { ++ typedef SquaredDifferenceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SquaredDifferenceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SquaredDifferenceOptionsBuilder &operator=(const SquaredDifferenceOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -8978,14 +9389,12 @@ flatbuffers::Offset CreateSquaredDifferenceOptions(fla + + struct MirrorPadOptionsT : public flatbuffers::NativeTable { + typedef MirrorPadOptions TableType; +- tflite::MirrorPadMode mode; +- MirrorPadOptionsT() +- : mode(tflite::MirrorPadMode_REFLECT) { +- } ++ tflite::MirrorPadMode mode = tflite::MirrorPadMode_REFLECT; + }; + + struct MirrorPadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MirrorPadOptionsT NativeTableType; ++ typedef MirrorPadOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_MODE = 4 + }; +@@ -9003,6 +9412,7 @@ struct MirrorPadOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MirrorPadOptionsBuilder { ++ typedef MirrorPadOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_mode(tflite::MirrorPadMode mode) { +@@ -9012,7 +9422,6 @@ struct MirrorPadOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MirrorPadOptionsBuilder &operator=(const MirrorPadOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9032,14 +9441,12 @@ flatbuffers::Offset CreateMirrorPadOptions(flatbuffers::FlatBu + + struct UniqueOptionsT : public flatbuffers::NativeTable { + typedef UniqueOptions TableType; +- tflite::TensorType idx_out_type; +- UniqueOptionsT() +- : idx_out_type(tflite::TensorType_INT32) { +- } ++ tflite::TensorType idx_out_type = tflite::TensorType_INT32; + }; + + struct UniqueOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef UniqueOptionsT NativeTableType; ++ typedef UniqueOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_IDX_OUT_TYPE = 4 + }; +@@ -9057,6 +9464,7 @@ struct UniqueOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct UniqueOptionsBuilder { ++ typedef UniqueOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_idx_out_type(tflite::TensorType idx_out_type) { +@@ -9066,7 +9474,6 @@ struct UniqueOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- UniqueOptionsBuilder &operator=(const UniqueOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9086,12 +9493,11 @@ flatbuffers::Offset CreateUniqueOptions(flatbuffers::FlatBufferBu + + struct ReverseV2OptionsT : public flatbuffers::NativeTable { + typedef ReverseV2Options TableType; +- ReverseV2OptionsT() { +- } + }; + + struct ReverseV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReverseV2OptionsT NativeTableType; ++ typedef ReverseV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9102,13 +9508,13 @@ struct ReverseV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ReverseV2OptionsBuilder { ++ typedef ReverseV2Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ReverseV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReverseV2OptionsBuilder &operator=(const ReverseV2OptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9126,12 +9532,11 @@ flatbuffers::Offset CreateReverseV2Options(flatbuffers::FlatBu + + struct AddNOptionsT : public flatbuffers::NativeTable { + typedef AddNOptions TableType; +- AddNOptionsT() { +- } + }; + + struct AddNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AddNOptionsT NativeTableType; ++ typedef AddNOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9142,13 +9547,13 @@ struct AddNOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct AddNOptionsBuilder { ++ typedef AddNOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AddNOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- AddNOptionsBuilder &operator=(const AddNOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9166,12 +9571,11 @@ flatbuffers::Offset CreateAddNOptions(flatbuffers::FlatBufferBuilde + + struct GatherNdOptionsT : public flatbuffers::NativeTable { + typedef GatherNdOptions TableType; +- GatherNdOptionsT() { +- } + }; + + struct GatherNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GatherNdOptionsT NativeTableType; ++ typedef GatherNdOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9182,13 +9586,13 @@ struct GatherNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GatherNdOptionsBuilder { ++ typedef GatherNdOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit GatherNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GatherNdOptionsBuilder &operator=(const GatherNdOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9206,12 +9610,11 @@ flatbuffers::Offset CreateGatherNdOptions(flatbuffers::FlatBuff + + struct WhereOptionsT : public flatbuffers::NativeTable { + typedef WhereOptions TableType; +- WhereOptionsT() { +- } + }; + + struct WhereOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef WhereOptionsT NativeTableType; ++ typedef WhereOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9222,13 +9625,13 @@ struct WhereOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct WhereOptionsBuilder { ++ typedef WhereOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit WhereOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- WhereOptionsBuilder &operator=(const WhereOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9246,16 +9649,13 @@ flatbuffers::Offset CreateWhereOptions(flatbuffers::FlatBufferBuil + + struct ReverseSequenceOptionsT : public flatbuffers::NativeTable { + typedef ReverseSequenceOptions TableType; +- int32_t seq_dim; +- int32_t batch_dim; +- ReverseSequenceOptionsT() +- : seq_dim(0), +- batch_dim(0) { +- } ++ int32_t seq_dim = 0; ++ int32_t batch_dim = 0; + }; + + struct ReverseSequenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReverseSequenceOptionsT NativeTableType; ++ typedef ReverseSequenceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SEQ_DIM = 4, + VT_BATCH_DIM = 6 +@@ -9278,6 +9678,7 @@ struct ReverseSequenceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab + }; + + struct ReverseSequenceOptionsBuilder { ++ typedef ReverseSequenceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_seq_dim(int32_t seq_dim) { +@@ -9290,7 +9691,6 @@ struct ReverseSequenceOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReverseSequenceOptionsBuilder &operator=(const ReverseSequenceOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9312,12 +9712,11 @@ flatbuffers::Offset CreateReverseSequenceOptions(flatbuf + + struct MatrixDiagOptionsT : public flatbuffers::NativeTable { + typedef MatrixDiagOptions TableType; +- MatrixDiagOptionsT() { +- } + }; + + struct MatrixDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MatrixDiagOptionsT NativeTableType; ++ typedef MatrixDiagOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9328,13 +9727,13 @@ struct MatrixDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MatrixDiagOptionsBuilder { ++ typedef MatrixDiagOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit MatrixDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MatrixDiagOptionsBuilder &operator=(const MatrixDiagOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9352,12 +9751,11 @@ flatbuffers::Offset CreateMatrixDiagOptions(flatbuffers::Flat + + struct QuantizeOptionsT : public flatbuffers::NativeTable { + typedef QuantizeOptions TableType; +- QuantizeOptionsT() { +- } + }; + + struct QuantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef QuantizeOptionsT NativeTableType; ++ typedef QuantizeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9368,13 +9766,13 @@ struct QuantizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct QuantizeOptionsBuilder { ++ typedef QuantizeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit QuantizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- QuantizeOptionsBuilder &operator=(const QuantizeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9392,12 +9790,11 @@ flatbuffers::Offset CreateQuantizeOptions(flatbuffers::FlatBuff + + struct MatrixSetDiagOptionsT : public flatbuffers::NativeTable { + typedef MatrixSetDiagOptions TableType; +- MatrixSetDiagOptionsT() { +- } + }; + + struct MatrixSetDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MatrixSetDiagOptionsT NativeTableType; ++ typedef MatrixSetDiagOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9408,13 +9805,13 @@ struct MatrixSetDiagOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct MatrixSetDiagOptionsBuilder { ++ typedef MatrixSetDiagOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit MatrixSetDiagOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MatrixSetDiagOptionsBuilder &operator=(const MatrixSetDiagOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9432,16 +9829,13 @@ flatbuffers::Offset CreateMatrixSetDiagOptions(flatbuffers + + struct IfOptionsT : public flatbuffers::NativeTable { + typedef IfOptions TableType; +- int32_t then_subgraph_index; +- int32_t else_subgraph_index; +- IfOptionsT() +- : then_subgraph_index(0), +- else_subgraph_index(0) { +- } ++ int32_t then_subgraph_index = 0; ++ int32_t else_subgraph_index = 0; + }; + + struct IfOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef IfOptionsT NativeTableType; ++ typedef IfOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_THEN_SUBGRAPH_INDEX = 4, + VT_ELSE_SUBGRAPH_INDEX = 6 +@@ -9464,6 +9858,7 @@ struct IfOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct IfOptionsBuilder { ++ typedef IfOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_then_subgraph_index(int32_t then_subgraph_index) { +@@ -9476,7 +9871,6 @@ struct IfOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- IfOptionsBuilder &operator=(const IfOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9498,14 +9892,12 @@ flatbuffers::Offset CreateIfOptions(flatbuffers::FlatBufferBuilder &_ + + struct CallOnceOptionsT : public flatbuffers::NativeTable { + typedef CallOnceOptions TableType; +- int32_t init_subgraph_index; +- CallOnceOptionsT() +- : init_subgraph_index(0) { +- } ++ int32_t init_subgraph_index = 0; + }; + + struct CallOnceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CallOnceOptionsT NativeTableType; ++ typedef CallOnceOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INIT_SUBGRAPH_INDEX = 4 + }; +@@ -9523,6 +9915,7 @@ struct CallOnceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CallOnceOptionsBuilder { ++ typedef CallOnceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_init_subgraph_index(int32_t init_subgraph_index) { +@@ -9532,7 +9925,6 @@ struct CallOnceOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CallOnceOptionsBuilder &operator=(const CallOnceOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9552,16 +9944,13 @@ flatbuffers::Offset CreateCallOnceOptions(flatbuffers::FlatBuff + + struct WhileOptionsT : public flatbuffers::NativeTable { + typedef WhileOptions TableType; +- int32_t cond_subgraph_index; +- int32_t body_subgraph_index; +- WhileOptionsT() +- : cond_subgraph_index(0), +- body_subgraph_index(0) { +- } ++ int32_t cond_subgraph_index = 0; ++ int32_t body_subgraph_index = 0; + }; + + struct WhileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef WhileOptionsT NativeTableType; ++ typedef WhileOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_COND_SUBGRAPH_INDEX = 4, + VT_BODY_SUBGRAPH_INDEX = 6 +@@ -9584,6 +9973,7 @@ struct WhileOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct WhileOptionsBuilder { ++ typedef WhileOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_cond_subgraph_index(int32_t cond_subgraph_index) { +@@ -9596,7 +9986,6 @@ struct WhileOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- WhileOptionsBuilder &operator=(const WhileOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9618,12 +10007,11 @@ flatbuffers::Offset CreateWhileOptions(flatbuffers::FlatBufferBuil + + struct NonMaxSuppressionV4OptionsT : public flatbuffers::NativeTable { + typedef NonMaxSuppressionV4Options TableType; +- NonMaxSuppressionV4OptionsT() { +- } + }; + + struct NonMaxSuppressionV4Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NonMaxSuppressionV4OptionsT NativeTableType; ++ typedef NonMaxSuppressionV4OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9634,13 +10022,13 @@ struct NonMaxSuppressionV4Options FLATBUFFERS_FINAL_CLASS : private flatbuffers: + }; + + struct NonMaxSuppressionV4OptionsBuilder { ++ typedef NonMaxSuppressionV4Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit NonMaxSuppressionV4OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NonMaxSuppressionV4OptionsBuilder &operator=(const NonMaxSuppressionV4OptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9658,12 +10046,11 @@ flatbuffers::Offset CreateNonMaxSuppressionV4Options + + struct NonMaxSuppressionV5OptionsT : public flatbuffers::NativeTable { + typedef NonMaxSuppressionV5Options TableType; +- NonMaxSuppressionV5OptionsT() { +- } + }; + + struct NonMaxSuppressionV5Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef NonMaxSuppressionV5OptionsT NativeTableType; ++ typedef NonMaxSuppressionV5OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9674,13 +10061,13 @@ struct NonMaxSuppressionV5Options FLATBUFFERS_FINAL_CLASS : private flatbuffers: + }; + + struct NonMaxSuppressionV5OptionsBuilder { ++ typedef NonMaxSuppressionV5Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit NonMaxSuppressionV5OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- NonMaxSuppressionV5OptionsBuilder &operator=(const NonMaxSuppressionV5OptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9698,12 +10085,11 @@ flatbuffers::Offset CreateNonMaxSuppressionV5Options + + struct ScatterNdOptionsT : public flatbuffers::NativeTable { + typedef ScatterNdOptions TableType; +- ScatterNdOptionsT() { +- } + }; + + struct ScatterNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ScatterNdOptionsT NativeTableType; ++ typedef ScatterNdOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9714,13 +10100,13 @@ struct ScatterNdOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ScatterNdOptionsBuilder { ++ typedef ScatterNdOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ScatterNdOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ScatterNdOptionsBuilder &operator=(const ScatterNdOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9738,12 +10124,11 @@ flatbuffers::Offset CreateScatterNdOptions(flatbuffers::FlatBu + + struct SelectV2OptionsT : public flatbuffers::NativeTable { + typedef SelectV2Options TableType; +- SelectV2OptionsT() { +- } + }; + + struct SelectV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SelectV2OptionsT NativeTableType; ++ typedef SelectV2OptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9754,13 +10139,13 @@ struct SelectV2Options FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SelectV2OptionsBuilder { ++ typedef SelectV2Options Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SelectV2OptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SelectV2OptionsBuilder &operator=(const SelectV2OptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9778,12 +10163,11 @@ flatbuffers::Offset CreateSelectV2Options(flatbuffers::FlatBuff + + struct DensifyOptionsT : public flatbuffers::NativeTable { + typedef DensifyOptions TableType; +- DensifyOptionsT() { +- } + }; + + struct DensifyOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DensifyOptionsT NativeTableType; ++ typedef DensifyOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9794,13 +10178,13 @@ struct DensifyOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct DensifyOptionsBuilder { ++ typedef DensifyOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit DensifyOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DensifyOptionsBuilder &operator=(const DensifyOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9818,12 +10202,11 @@ flatbuffers::Offset CreateDensifyOptions(flatbuffers::FlatBuffer + + struct SegmentSumOptionsT : public flatbuffers::NativeTable { + typedef SegmentSumOptions TableType; +- SegmentSumOptionsT() { +- } + }; + + struct SegmentSumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SegmentSumOptionsT NativeTableType; ++ typedef SegmentSumOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -9834,13 +10217,13 @@ struct SegmentSumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SegmentSumOptionsBuilder { ++ typedef SegmentSumOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit SegmentSumOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SegmentSumOptionsBuilder &operator=(const SegmentSumOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9858,18 +10241,14 @@ flatbuffers::Offset CreateSegmentSumOptions(flatbuffers::Flat + + struct BatchMatMulOptionsT : public flatbuffers::NativeTable { + typedef BatchMatMulOptions TableType; +- bool adj_x; +- bool adj_y; +- bool asymmetric_quantize_inputs; +- BatchMatMulOptionsT() +- : adj_x(false), +- adj_y(false), +- asymmetric_quantize_inputs(false) { +- } ++ bool adj_x = false; ++ bool adj_y = false; ++ bool asymmetric_quantize_inputs = false; + }; + + struct BatchMatMulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BatchMatMulOptionsT NativeTableType; ++ typedef BatchMatMulOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_ADJ_X = 4, + VT_ADJ_Y = 6, +@@ -9897,6 +10276,7 @@ struct BatchMatMulOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BatchMatMulOptionsBuilder { ++ typedef BatchMatMulOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_adj_x(bool adj_x) { +@@ -9912,7 +10292,6 @@ struct BatchMatMulOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BatchMatMulOptionsBuilder &operator=(const BatchMatMulOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -9936,16 +10315,13 @@ flatbuffers::Offset CreateBatchMatMulOptions(flatbuffers::Fl + + struct CumsumOptionsT : public flatbuffers::NativeTable { + typedef CumsumOptions TableType; +- bool exclusive; +- bool reverse; +- CumsumOptionsT() +- : exclusive(false), +- reverse(false) { +- } ++ bool exclusive = false; ++ bool reverse = false; + }; + + struct CumsumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef CumsumOptionsT NativeTableType; ++ typedef CumsumOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_EXCLUSIVE = 4, + VT_REVERSE = 6 +@@ -9968,6 +10344,7 @@ struct CumsumOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct CumsumOptionsBuilder { ++ typedef CumsumOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_exclusive(bool exclusive) { +@@ -9980,7 +10357,6 @@ struct CumsumOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- CumsumOptionsBuilder &operator=(const CumsumOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10002,12 +10378,11 @@ flatbuffers::Offset CreateCumsumOptions(flatbuffers::FlatBufferBu + + struct BroadcastToOptionsT : public flatbuffers::NativeTable { + typedef BroadcastToOptions TableType; +- BroadcastToOptionsT() { +- } + }; + + struct BroadcastToOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BroadcastToOptionsT NativeTableType; ++ typedef BroadcastToOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10018,13 +10393,13 @@ struct BroadcastToOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BroadcastToOptionsBuilder { ++ typedef BroadcastToOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit BroadcastToOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BroadcastToOptionsBuilder &operator=(const BroadcastToOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10042,12 +10417,11 @@ flatbuffers::Offset CreateBroadcastToOptions(flatbuffers::Fl + + struct Rfft2dOptionsT : public flatbuffers::NativeTable { + typedef Rfft2dOptions TableType; +- Rfft2dOptionsT() { +- } + }; + + struct Rfft2dOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef Rfft2dOptionsT NativeTableType; ++ typedef Rfft2dOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10058,13 +10432,13 @@ struct Rfft2dOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct Rfft2dOptionsBuilder { ++ typedef Rfft2dOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit Rfft2dOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- Rfft2dOptionsBuilder &operator=(const Rfft2dOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10082,18 +10456,14 @@ flatbuffers::Offset CreateRfft2dOptions(flatbuffers::FlatBufferBu + + struct HashtableOptionsT : public flatbuffers::NativeTable { + typedef HashtableOptions TableType; +- int32_t table_id; +- tflite::TensorType key_dtype; +- tflite::TensorType value_dtype; +- HashtableOptionsT() +- : table_id(0), +- key_dtype(tflite::TensorType_FLOAT32), +- value_dtype(tflite::TensorType_FLOAT32) { +- } ++ int32_t table_id = 0; ++ tflite::TensorType key_dtype = tflite::TensorType_FLOAT32; ++ tflite::TensorType value_dtype = tflite::TensorType_FLOAT32; + }; + + struct HashtableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableOptionsT NativeTableType; ++ typedef HashtableOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TABLE_ID = 4, + VT_KEY_DTYPE = 6, +@@ -10121,6 +10491,7 @@ struct HashtableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct HashtableOptionsBuilder { ++ typedef HashtableOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_table_id(int32_t table_id) { +@@ -10136,7 +10507,6 @@ struct HashtableOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- HashtableOptionsBuilder &operator=(const HashtableOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10160,12 +10530,11 @@ flatbuffers::Offset CreateHashtableOptions(flatbuffers::FlatBu + + struct HashtableFindOptionsT : public flatbuffers::NativeTable { + typedef HashtableFindOptions TableType; +- HashtableFindOptionsT() { +- } + }; + + struct HashtableFindOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableFindOptionsT NativeTableType; ++ typedef HashtableFindOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10176,13 +10545,13 @@ struct HashtableFindOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct HashtableFindOptionsBuilder { ++ typedef HashtableFindOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HashtableFindOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- HashtableFindOptionsBuilder &operator=(const HashtableFindOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10200,12 +10569,11 @@ flatbuffers::Offset CreateHashtableFindOptions(flatbuffers + + struct HashtableImportOptionsT : public flatbuffers::NativeTable { + typedef HashtableImportOptions TableType; +- HashtableImportOptionsT() { +- } + }; + + struct HashtableImportOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableImportOptionsT NativeTableType; ++ typedef HashtableImportOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10216,13 +10584,13 @@ struct HashtableImportOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tab + }; + + struct HashtableImportOptionsBuilder { ++ typedef HashtableImportOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HashtableImportOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- HashtableImportOptionsBuilder &operator=(const HashtableImportOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10240,12 +10608,11 @@ flatbuffers::Offset CreateHashtableImportOptions(flatbuf + + struct HashtableSizeOptionsT : public flatbuffers::NativeTable { + typedef HashtableSizeOptions TableType; +- HashtableSizeOptionsT() { +- } + }; + + struct HashtableSizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef HashtableSizeOptionsT NativeTableType; ++ typedef HashtableSizeOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10256,13 +10623,13 @@ struct HashtableSizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct HashtableSizeOptionsBuilder { ++ typedef HashtableSizeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit HashtableSizeOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- HashtableSizeOptionsBuilder &operator=(const HashtableSizeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10280,14 +10647,13 @@ flatbuffers::Offset CreateHashtableSizeOptions(flatbuffers + + struct VarHandleOptionsT : public flatbuffers::NativeTable { + typedef VarHandleOptions TableType; +- std::string container; +- std::string shared_name; +- VarHandleOptionsT() { +- } ++ std::string container{}; ++ std::string shared_name{}; + }; + + struct VarHandleOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef VarHandleOptionsT NativeTableType; ++ typedef VarHandleOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_CONTAINER = 4, + VT_SHARED_NAME = 6 +@@ -10312,6 +10678,7 @@ struct VarHandleOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct VarHandleOptionsBuilder { ++ typedef VarHandleOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_container(flatbuffers::Offset container) { +@@ -10324,7 +10691,6 @@ struct VarHandleOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- VarHandleOptionsBuilder &operator=(const VarHandleOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10358,12 +10724,11 @@ flatbuffers::Offset CreateVarHandleOptions(flatbuffers::FlatBu + + struct ReadVariableOptionsT : public flatbuffers::NativeTable { + typedef ReadVariableOptions TableType; +- ReadVariableOptionsT() { +- } + }; + + struct ReadVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ReadVariableOptionsT NativeTableType; ++ typedef ReadVariableOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10374,13 +10739,13 @@ struct ReadVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table + }; + + struct ReadVariableOptionsBuilder { ++ typedef ReadVariableOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit ReadVariableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ReadVariableOptionsBuilder &operator=(const ReadVariableOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10398,12 +10763,11 @@ flatbuffers::Offset CreateReadVariableOptions(flatbuffers:: + + struct AssignVariableOptionsT : public flatbuffers::NativeTable { + typedef AssignVariableOptions TableType; +- AssignVariableOptionsT() { +- } + }; + + struct AssignVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef AssignVariableOptionsT NativeTableType; ++ typedef AssignVariableOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10414,13 +10778,13 @@ struct AssignVariableOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Tabl + }; + + struct AssignVariableOptionsBuilder { ++ typedef AssignVariableOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit AssignVariableOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- AssignVariableOptionsBuilder &operator=(const AssignVariableOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10438,16 +10802,13 @@ flatbuffers::Offset CreateAssignVariableOptions(flatbuffe + + struct RandomOptionsT : public flatbuffers::NativeTable { + typedef RandomOptions TableType; +- int64_t seed; +- int64_t seed2; +- RandomOptionsT() +- : seed(0), +- seed2(0) { +- } ++ int64_t seed = 0; ++ int64_t seed2 = 0; + }; + + struct RandomOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef RandomOptionsT NativeTableType; ++ typedef RandomOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_SEED = 4, + VT_SEED2 = 6 +@@ -10470,6 +10831,7 @@ struct RandomOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct RandomOptionsBuilder { ++ typedef RandomOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_seed(int64_t seed) { +@@ -10482,7 +10844,6 @@ struct RandomOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- RandomOptionsBuilder &operator=(const RandomOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10504,13 +10865,12 @@ flatbuffers::Offset CreateRandomOptions(flatbuffers::FlatBufferBu + + struct BucketizeOptionsT : public flatbuffers::NativeTable { + typedef BucketizeOptions TableType; +- std::vector boundaries; +- BucketizeOptionsT() { +- } ++ std::vector boundaries{}; + }; + + struct BucketizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BucketizeOptionsT NativeTableType; ++ typedef BucketizeOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_BOUNDARIES = 4 + }; +@@ -10529,6 +10889,7 @@ struct BucketizeOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BucketizeOptionsBuilder { ++ typedef BucketizeOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_boundaries(flatbuffers::Offset> boundaries) { +@@ -10538,7 +10899,6 @@ struct BucketizeOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BucketizeOptionsBuilder &operator=(const BucketizeOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10567,14 +10927,12 @@ flatbuffers::Offset CreateBucketizeOptions(flatbuffers::FlatBu + + struct GeluOptionsT : public flatbuffers::NativeTable { + typedef GeluOptions TableType; +- bool approximate; +- GeluOptionsT() +- : approximate(false) { +- } ++ bool approximate = false; + }; + + struct GeluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef GeluOptionsT NativeTableType; ++ typedef GeluOptionsBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_APPROXIMATE = 4 + }; +@@ -10592,6 +10950,7 @@ struct GeluOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct GeluOptionsBuilder { ++ typedef GeluOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_approximate(bool approximate) { +@@ -10601,7 +10960,6 @@ struct GeluOptionsBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- GeluOptionsBuilder &operator=(const GeluOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10621,12 +10979,11 @@ flatbuffers::Offset CreateGeluOptions(flatbuffers::FlatBufferBuilde + + struct DynamicUpdateSliceOptionsT : public flatbuffers::NativeTable { + typedef DynamicUpdateSliceOptions TableType; +- DynamicUpdateSliceOptionsT() { +- } + }; + + struct DynamicUpdateSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef DynamicUpdateSliceOptionsT NativeTableType; ++ typedef DynamicUpdateSliceOptionsBuilder Builder; + bool Verify(flatbuffers::Verifier &verifier) const { + return VerifyTableStart(verifier) && + verifier.EndTable(); +@@ -10637,13 +10994,13 @@ struct DynamicUpdateSliceOptions FLATBUFFERS_FINAL_CLASS : private flatbuffers:: + }; + + struct DynamicUpdateSliceOptionsBuilder { ++ typedef DynamicUpdateSliceOptions Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + explicit DynamicUpdateSliceOptionsBuilder(flatbuffers::FlatBufferBuilder &_fbb) + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- DynamicUpdateSliceOptionsBuilder &operator=(const DynamicUpdateSliceOptionsBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10661,19 +11018,15 @@ flatbuffers::Offset CreateDynamicUpdateSliceOptions(f + + struct OperatorCodeT : public flatbuffers::NativeTable { + typedef OperatorCode TableType; +- int8_t deprecated_builtin_code; +- std::string custom_code; +- int32_t version; +- tflite::BuiltinOperator builtin_code; +- OperatorCodeT() +- : deprecated_builtin_code(0), +- version(1), +- builtin_code(tflite::BuiltinOperator_ADD) { +- } ++ int8_t deprecated_builtin_code = 0; ++ std::string custom_code{}; ++ int32_t version = 1; ++ tflite::BuiltinOperator builtin_code = tflite::BuiltinOperator_ADD; + }; + + struct OperatorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OperatorCodeT NativeTableType; ++ typedef OperatorCodeBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DEPRECATED_BUILTIN_CODE = 4, + VT_CUSTOM_CODE = 6, +@@ -10707,6 +11060,7 @@ struct OperatorCode FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct OperatorCodeBuilder { ++ typedef OperatorCode Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_deprecated_builtin_code(int8_t deprecated_builtin_code) { +@@ -10725,7 +11079,6 @@ struct OperatorCodeBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- OperatorCodeBuilder &operator=(const OperatorCodeBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -10766,22 +11119,19 @@ flatbuffers::Offset CreateOperatorCode(flatbuffers::FlatBufferBuil + + struct OperatorT : public flatbuffers::NativeTable { + typedef Operator TableType; +- uint32_t opcode_index; +- std::vector inputs; +- std::vector outputs; +- tflite::BuiltinOptionsUnion builtin_options; +- std::vector custom_options; +- tflite::CustomOptionsFormat custom_options_format; +- std::vector mutating_variable_inputs; +- std::vector intermediates; +- OperatorT() +- : opcode_index(0), +- custom_options_format(tflite::CustomOptionsFormat_FLEXBUFFERS) { +- } ++ uint32_t opcode_index = 0; ++ std::vector inputs{}; ++ std::vector outputs{}; ++ tflite::BuiltinOptionsUnion builtin_options{}; ++ std::vector custom_options{}; ++ tflite::CustomOptionsFormat custom_options_format = tflite::CustomOptionsFormat_FLEXBUFFERS; ++ std::vector mutating_variable_inputs{}; ++ std::vector intermediates{}; + }; + + struct Operator FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef OperatorT NativeTableType; ++ typedef OperatorBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_OPCODE_INDEX = 4, + VT_INPUTS = 6, +@@ -11665,6 +12015,7 @@ template<> inline const tflite::DynamicUpdateSliceOptions *Operator::builtin_opt + } + + struct OperatorBuilder { ++ typedef Operator Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_opcode_index(uint32_t opcode_index) { +@@ -11698,7 +12049,6 @@ struct OperatorBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- OperatorBuilder &operator=(const OperatorBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -11763,17 +12113,16 @@ flatbuffers::Offset CreateOperator(flatbuffers::FlatBufferBuilder &_fb + + struct SubGraphT : public flatbuffers::NativeTable { + typedef SubGraph TableType; +- std::vector> tensors; +- std::vector inputs; +- std::vector outputs; +- std::vector> operators; +- std::string name; +- SubGraphT() { +- } ++ std::vector> tensors{}; ++ std::vector inputs{}; ++ std::vector outputs{}; ++ std::vector> operators{}; ++ std::string name{}; + }; + + struct SubGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SubGraphT NativeTableType; ++ typedef SubGraphBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_TENSORS = 4, + VT_INPUTS = 6, +@@ -11818,6 +12167,7 @@ struct SubGraph FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SubGraphBuilder { ++ typedef SubGraph Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_tensors(flatbuffers::Offset>> tensors) { +@@ -11839,7 +12189,6 @@ struct SubGraphBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SubGraphBuilder &operator=(const SubGraphBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -11888,13 +12237,12 @@ flatbuffers::Offset CreateSubGraph(flatbuffers::FlatBufferBuilder &_fb + + struct BufferT : public flatbuffers::NativeTable { + typedef Buffer TableType; +- std::vector data; +- BufferT() { +- } ++ std::vector data{}; + }; + + struct Buffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef BufferT NativeTableType; ++ typedef BufferBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_DATA = 4 + }; +@@ -11913,6 +12261,7 @@ struct Buffer FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct BufferBuilder { ++ typedef Buffer Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_data(flatbuffers::Offset> data) { +@@ -11922,7 +12271,6 @@ struct BufferBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- BufferBuilder &operator=(const BufferBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -11952,15 +12300,13 @@ flatbuffers::Offset CreateBuffer(flatbuffers::FlatBufferBuilder &_fbb, c + + struct MetadataT : public flatbuffers::NativeTable { + typedef Metadata TableType; +- std::string name; +- uint32_t buffer; +- MetadataT() +- : buffer(0) { +- } ++ std::string name{}; ++ uint32_t buffer = 0; + }; + + struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef MetadataT NativeTableType; ++ typedef MetadataBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NAME = 4, + VT_BUFFER = 6 +@@ -11984,6 +12330,7 @@ struct Metadata FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct MetadataBuilder { ++ typedef Metadata Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { +@@ -11996,7 +12343,6 @@ struct MetadataBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- MetadataBuilder &operator=(const MetadataBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -12029,15 +12375,13 @@ flatbuffers::Offset CreateMetadata(flatbuffers::FlatBufferBuilder &_fb + + struct TensorMapT : public flatbuffers::NativeTable { + typedef TensorMap TableType; +- std::string name; +- uint32_t tensor_index; +- TensorMapT() +- : tensor_index(0) { +- } ++ std::string name{}; ++ uint32_t tensor_index = 0; + }; + + struct TensorMap FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef TensorMapT NativeTableType; ++ typedef TensorMapBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_NAME = 4, + VT_TENSOR_INDEX = 6 +@@ -12061,6 +12405,7 @@ struct TensorMap FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct TensorMapBuilder { ++ typedef TensorMap Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_name(flatbuffers::Offset name) { +@@ -12073,7 +12418,6 @@ struct TensorMapBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- TensorMapBuilder &operator=(const TensorMapBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -12106,17 +12450,15 @@ flatbuffers::Offset CreateTensorMap(flatbuffers::FlatBufferBuilder &_ + + struct SignatureDefT : public flatbuffers::NativeTable { + typedef SignatureDef TableType; +- std::vector> inputs; +- std::vector> outputs; +- std::string signature_key; +- uint32_t subgraph_index; +- SignatureDefT() +- : subgraph_index(0) { +- } ++ std::vector> inputs{}; ++ std::vector> outputs{}; ++ std::string signature_key{}; ++ uint32_t subgraph_index = 0; + }; + + struct SignatureDef FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef SignatureDefT NativeTableType; ++ typedef SignatureDefBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_INPUTS = 4, + VT_OUTPUTS = 6, +@@ -12154,6 +12496,7 @@ struct SignatureDef FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct SignatureDefBuilder { ++ typedef SignatureDef Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_inputs(flatbuffers::Offset>> inputs) { +@@ -12172,7 +12515,6 @@ struct SignatureDefBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- SignatureDefBuilder &operator=(const SignatureDefBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -12215,21 +12557,19 @@ flatbuffers::Offset CreateSignatureDef(flatbuffers::FlatBufferBuil + + struct ModelT : public flatbuffers::NativeTable { + typedef Model TableType; +- uint32_t version; +- std::vector> operator_codes; +- std::vector> subgraphs; +- std::string description; +- std::vector> buffers; +- std::vector metadata_buffer; +- std::vector> metadata; +- std::vector> signature_defs; +- ModelT() +- : version(0) { +- } ++ uint32_t version = 0; ++ std::vector> operator_codes{}; ++ std::vector> subgraphs{}; ++ std::string description{}; ++ std::vector> buffers{}; ++ std::vector metadata_buffer{}; ++ std::vector> metadata{}; ++ std::vector> signature_defs{}; + }; + + struct Model FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + typedef ModelT NativeTableType; ++ typedef ModelBuilder Builder; + enum FlatBuffersVTableOffset FLATBUFFERS_VTABLE_UNDERLYING_TYPE { + VT_VERSION = 4, + VT_OPERATOR_CODES = 6, +@@ -12294,6 +12634,7 @@ struct Model FLATBUFFERS_FINAL_CLASS : private flatbuffers::Table { + }; + + struct ModelBuilder { ++ typedef Model Table; + flatbuffers::FlatBufferBuilder &fbb_; + flatbuffers::uoffset_t start_; + void add_version(uint32_t version) { +@@ -12324,7 +12665,6 @@ struct ModelBuilder { + : fbb_(_fbb) { + start_ = fbb_.StartTable(); + } +- ModelBuilder &operator=(const ModelBuilder &); + flatbuffers::Offset Finish() { + const auto end = fbb_.EndTable(start_); + auto o = flatbuffers::Offset(end); +@@ -12386,9 +12726,9 @@ inline flatbuffers::Offset CreateModelDirect( + flatbuffers::Offset CreateModel(flatbuffers::FlatBufferBuilder &_fbb, const ModelT *_o, const flatbuffers::rehasher_function_t *_rehasher = nullptr); + + inline CustomQuantizationT *CustomQuantization::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CustomQuantizationT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CustomQuantizationT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CustomQuantization::UnPackTo(CustomQuantizationT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12413,9 +12753,9 @@ inline flatbuffers::Offset CreateCustomQuantization(flatbuff + } + + inline QuantizationParametersT *QuantizationParameters::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizationParametersT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizationParametersT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizationParameters::UnPackTo(QuantizationParametersT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12457,9 +12797,9 @@ inline flatbuffers::Offset CreateQuantizationParameters( + } + + inline Int32VectorT *Int32Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Int32VectorT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Int32VectorT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Int32Vector::UnPackTo(Int32VectorT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12483,9 +12823,9 @@ inline flatbuffers::Offset CreateInt32Vector(flatbuffers::FlatBuffe + } + + inline Uint16VectorT *Uint16Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Uint16VectorT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Uint16VectorT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Uint16Vector::UnPackTo(Uint16VectorT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12510,9 +12850,9 @@ inline flatbuffers::Offset CreateUint16Vector(flatbuffers::FlatBuf + } + + inline Uint8VectorT *Uint8Vector::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Uint8VectorT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Uint8VectorT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Uint8Vector::UnPackTo(Uint8VectorT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12537,9 +12877,9 @@ inline flatbuffers::Offset CreateUint8Vector(flatbuffers::FlatBuffe + } + + inline DimensionMetadataT *DimensionMetadata::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DimensionMetadataT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DimensionMetadataT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DimensionMetadata::UnPackTo(DimensionMetadataT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12578,9 +12918,9 @@ inline flatbuffers::Offset CreateDimensionMetadata(flatbuffer + } + + inline SparsityParametersT *SparsityParameters::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SparsityParametersT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SparsityParametersT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SparsityParameters::UnPackTo(SparsityParametersT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12588,7 +12928,7 @@ inline void SparsityParameters::UnPackTo(SparsityParametersT *_o, const flatbuff + (void)_resolver; + { auto _e = traversal_order(); if (_e) { _o->traversal_order.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->traversal_order[_i] = _e->Get(_i); } } } + { auto _e = block_map(); if (_e) { _o->block_map.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->block_map[_i] = _e->Get(_i); } } } +- { auto _e = dim_metadata(); if (_e) { _o->dim_metadata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->dim_metadata[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = dim_metadata(); if (_e) { _o->dim_metadata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->dim_metadata[_i]) { _e->Get(_i)->UnPackTo(_o->dim_metadata[_i].get(), _resolver); } else { _o->dim_metadata[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + } + + inline flatbuffers::Offset SparsityParameters::Pack(flatbuffers::FlatBufferBuilder &_fbb, const SparsityParametersT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -12610,9 +12950,9 @@ inline flatbuffers::Offset CreateSparsityParameters(flatbuff + } + + inline TensorT *Tensor::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TensorT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TensorT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Tensor::UnPackTo(TensorT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12622,9 +12962,9 @@ inline void Tensor::UnPackTo(TensorT *_o, const flatbuffers::resolver_function_t + { auto _e = type(); _o->type = _e; } + { auto _e = buffer(); _o->buffer = _e; } + { auto _e = name(); if (_e) _o->name = _e->str(); } +- { auto _e = quantization(); if (_e) _o->quantization = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = quantization(); if (_e) { if(_o->quantization) { _e->UnPackTo(_o->quantization.get(), _resolver); } else { _o->quantization = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = is_variable(); _o->is_variable = _e; } +- { auto _e = sparsity(); if (_e) _o->sparsity = std::unique_ptr(_e->UnPack(_resolver)); } ++ { auto _e = sparsity(); if (_e) { if(_o->sparsity) { _e->UnPackTo(_o->sparsity.get(), _resolver); } else { _o->sparsity = std::unique_ptr(_e->UnPack(_resolver)); } } } + { auto _e = shape_signature(); if (_e) { _o->shape_signature.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->shape_signature[_i] = _e->Get(_i); } } } + } + +@@ -12657,9 +12997,9 @@ inline flatbuffers::Offset CreateTensor(flatbuffers::FlatBufferBuilder & + } + + inline Conv2DOptionsT *Conv2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Conv2DOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Conv2DOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Conv2DOptions::UnPackTo(Conv2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12698,9 +13038,9 @@ inline flatbuffers::Offset CreateConv2DOptions(flatbuffers::FlatB + } + + inline Conv3DOptionsT *Conv3DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Conv3DOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Conv3DOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Conv3DOptions::UnPackTo(Conv3DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12745,9 +13085,9 @@ inline flatbuffers::Offset CreateConv3DOptions(flatbuffers::FlatB + } + + inline Pool2DOptionsT *Pool2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Pool2DOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Pool2DOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Pool2DOptions::UnPackTo(Pool2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12786,9 +13126,9 @@ inline flatbuffers::Offset CreatePool2DOptions(flatbuffers::FlatB + } + + inline DepthwiseConv2DOptionsT *DepthwiseConv2DOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DepthwiseConv2DOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DepthwiseConv2DOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DepthwiseConv2DOptions::UnPackTo(DepthwiseConv2DOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12830,9 +13170,9 @@ inline flatbuffers::Offset CreateDepthwiseConv2DOptions( + } + + inline ConcatEmbeddingsOptionsT *ConcatEmbeddingsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ConcatEmbeddingsOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ConcatEmbeddingsOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ConcatEmbeddingsOptions::UnPackTo(ConcatEmbeddingsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12862,9 +13202,9 @@ inline flatbuffers::Offset CreateConcatEmbeddingsOption + } + + inline LSHProjectionOptionsT *LSHProjectionOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LSHProjectionOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LSHProjectionOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LSHProjectionOptions::UnPackTo(LSHProjectionOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12888,9 +13228,9 @@ inline flatbuffers::Offset CreateLSHProjectionOptions(flat + } + + inline SVDFOptionsT *SVDFOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SVDFOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SVDFOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SVDFOptions::UnPackTo(SVDFOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12920,9 +13260,9 @@ inline flatbuffers::Offset CreateSVDFOptions(flatbuffers::FlatBuffe + } + + inline RNNOptionsT *RNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RNNOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RNNOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RNNOptions::UnPackTo(RNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12949,9 +13289,9 @@ inline flatbuffers::Offset CreateRNNOptions(flatbuffers::FlatBufferB + } + + inline SequenceRNNOptionsT *SequenceRNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SequenceRNNOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SequenceRNNOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SequenceRNNOptions::UnPackTo(SequenceRNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -12981,9 +13321,9 @@ inline flatbuffers::Offset CreateSequenceRNNOptions(flatbuff + } + + inline BidirectionalSequenceRNNOptionsT *BidirectionalSequenceRNNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BidirectionalSequenceRNNOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BidirectionalSequenceRNNOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BidirectionalSequenceRNNOptions::UnPackTo(BidirectionalSequenceRNNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13016,9 +13356,9 @@ inline flatbuffers::Offset CreateBidirectionalS + } + + inline FullyConnectedOptionsT *FullyConnectedOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FullyConnectedOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FullyConnectedOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void FullyConnectedOptions::UnPackTo(FullyConnectedOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13051,9 +13391,9 @@ inline flatbuffers::Offset CreateFullyConnectedOptions(fl + } + + inline SoftmaxOptionsT *SoftmaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SoftmaxOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SoftmaxOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SoftmaxOptions::UnPackTo(SoftmaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13077,9 +13417,9 @@ inline flatbuffers::Offset CreateSoftmaxOptions(flatbuffers::Fla + } + + inline ConcatenationOptionsT *ConcatenationOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ConcatenationOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ConcatenationOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ConcatenationOptions::UnPackTo(ConcatenationOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13106,9 +13446,9 @@ inline flatbuffers::Offset CreateConcatenationOptions(flat + } + + inline AddOptionsT *AddOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new AddOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new AddOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void AddOptions::UnPackTo(AddOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13135,9 +13475,9 @@ inline flatbuffers::Offset CreateAddOptions(flatbuffers::FlatBufferB + } + + inline MulOptionsT *MulOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MulOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MulOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MulOptions::UnPackTo(MulOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13161,9 +13501,9 @@ inline flatbuffers::Offset CreateMulOptions(flatbuffers::FlatBufferB + } + + inline L2NormOptionsT *L2NormOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new L2NormOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new L2NormOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void L2NormOptions::UnPackTo(L2NormOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13187,9 +13527,9 @@ inline flatbuffers::Offset CreateL2NormOptions(flatbuffers::FlatB + } + + inline LocalResponseNormalizationOptionsT *LocalResponseNormalizationOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LocalResponseNormalizationOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LocalResponseNormalizationOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LocalResponseNormalizationOptions::UnPackTo(LocalResponseNormalizationOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13222,9 +13562,9 @@ inline flatbuffers::Offset CreateLocalRespons + } + + inline LSTMOptionsT *LSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LSTMOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LSTMOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LSTMOptions::UnPackTo(LSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13260,9 +13600,9 @@ inline flatbuffers::Offset CreateLSTMOptions(flatbuffers::FlatBuffe + } + + inline UnidirectionalSequenceLSTMOptionsT *UnidirectionalSequenceLSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new UnidirectionalSequenceLSTMOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new UnidirectionalSequenceLSTMOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void UnidirectionalSequenceLSTMOptions::UnPackTo(UnidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13298,9 +13638,9 @@ inline flatbuffers::Offset CreateUnidirection + } + + inline BidirectionalSequenceLSTMOptionsT *BidirectionalSequenceLSTMOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BidirectionalSequenceLSTMOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BidirectionalSequenceLSTMOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BidirectionalSequenceLSTMOptions::UnPackTo(BidirectionalSequenceLSTMOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13339,9 +13679,9 @@ inline flatbuffers::Offset CreateBidirectional + } + + inline ResizeBilinearOptionsT *ResizeBilinearOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ResizeBilinearOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ResizeBilinearOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ResizeBilinearOptions::UnPackTo(ResizeBilinearOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13368,9 +13708,9 @@ inline flatbuffers::Offset CreateResizeBilinearOptions(fl + } + + inline ResizeNearestNeighborOptionsT *ResizeNearestNeighborOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ResizeNearestNeighborOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ResizeNearestNeighborOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ResizeNearestNeighborOptions::UnPackTo(ResizeNearestNeighborOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13397,9 +13737,9 @@ inline flatbuffers::Offset CreateResizeNearestNeig + } + + inline CallOptionsT *CallOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CallOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CallOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CallOptions::UnPackTo(CallOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13423,9 +13763,9 @@ inline flatbuffers::Offset CreateCallOptions(flatbuffers::FlatBuffe + } + + inline PadOptionsT *PadOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PadOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PadOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PadOptions::UnPackTo(PadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13446,9 +13786,9 @@ inline flatbuffers::Offset CreatePadOptions(flatbuffers::FlatBufferB + } + + inline PadV2OptionsT *PadV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PadV2OptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PadV2OptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PadV2Options::UnPackTo(PadV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13469,9 +13809,9 @@ inline flatbuffers::Offset CreatePadV2Options(flatbuffers::FlatBuf + } + + inline ReshapeOptionsT *ReshapeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReshapeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReshapeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReshapeOptions::UnPackTo(ReshapeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13495,9 +13835,9 @@ inline flatbuffers::Offset CreateReshapeOptions(flatbuffers::Fla + } + + inline SpaceToBatchNDOptionsT *SpaceToBatchNDOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SpaceToBatchNDOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SpaceToBatchNDOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SpaceToBatchNDOptions::UnPackTo(SpaceToBatchNDOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13518,9 +13858,9 @@ inline flatbuffers::Offset CreateSpaceToBatchNDOptions(fl + } + + inline BatchToSpaceNDOptionsT *BatchToSpaceNDOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BatchToSpaceNDOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BatchToSpaceNDOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BatchToSpaceNDOptions::UnPackTo(BatchToSpaceNDOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13541,9 +13881,9 @@ inline flatbuffers::Offset CreateBatchToSpaceNDOptions(fl + } + + inline SkipGramOptionsT *SkipGramOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SkipGramOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SkipGramOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SkipGramOptions::UnPackTo(SkipGramOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13573,9 +13913,9 @@ inline flatbuffers::Offset CreateSkipGramOptions(flatbuffers::F + } + + inline SpaceToDepthOptionsT *SpaceToDepthOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SpaceToDepthOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SpaceToDepthOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SpaceToDepthOptions::UnPackTo(SpaceToDepthOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13599,9 +13939,9 @@ inline flatbuffers::Offset CreateSpaceToDepthOptions(flatbu + } + + inline DepthToSpaceOptionsT *DepthToSpaceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DepthToSpaceOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DepthToSpaceOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DepthToSpaceOptions::UnPackTo(DepthToSpaceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13625,9 +13965,9 @@ inline flatbuffers::Offset CreateDepthToSpaceOptions(flatbu + } + + inline SubOptionsT *SubOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SubOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SubOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SubOptions::UnPackTo(SubOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13654,9 +13994,9 @@ inline flatbuffers::Offset CreateSubOptions(flatbuffers::FlatBufferB + } + + inline DivOptionsT *DivOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DivOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DivOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DivOptions::UnPackTo(DivOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13680,9 +14020,9 @@ inline flatbuffers::Offset CreateDivOptions(flatbuffers::FlatBufferB + } + + inline TopKV2OptionsT *TopKV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TopKV2OptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TopKV2OptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TopKV2Options::UnPackTo(TopKV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13703,9 +14043,9 @@ inline flatbuffers::Offset CreateTopKV2Options(flatbuffers::FlatB + } + + inline EmbeddingLookupSparseOptionsT *EmbeddingLookupSparseOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new EmbeddingLookupSparseOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new EmbeddingLookupSparseOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void EmbeddingLookupSparseOptions::UnPackTo(EmbeddingLookupSparseOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13729,9 +14069,9 @@ inline flatbuffers::Offset CreateEmbeddingLookupSp + } + + inline GatherOptionsT *GatherOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GatherOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GatherOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GatherOptions::UnPackTo(GatherOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13758,9 +14098,9 @@ inline flatbuffers::Offset CreateGatherOptions(flatbuffers::FlatB + } + + inline TransposeOptionsT *TransposeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TransposeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TransposeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TransposeOptions::UnPackTo(TransposeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13781,9 +14121,9 @@ inline flatbuffers::Offset CreateTransposeOptions(flatbuffers: + } + + inline ExpOptionsT *ExpOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ExpOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ExpOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ExpOptions::UnPackTo(ExpOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13804,9 +14144,9 @@ inline flatbuffers::Offset CreateExpOptions(flatbuffers::FlatBufferB + } + + inline CosOptionsT *CosOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CosOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CosOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CosOptions::UnPackTo(CosOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13827,9 +14167,9 @@ inline flatbuffers::Offset CreateCosOptions(flatbuffers::FlatBufferB + } + + inline ReducerOptionsT *ReducerOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReducerOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReducerOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReducerOptions::UnPackTo(ReducerOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13853,9 +14193,9 @@ inline flatbuffers::Offset CreateReducerOptions(flatbuffers::Fla + } + + inline SqueezeOptionsT *SqueezeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SqueezeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SqueezeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SqueezeOptions::UnPackTo(SqueezeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13879,9 +14219,9 @@ inline flatbuffers::Offset CreateSqueezeOptions(flatbuffers::Fla + } + + inline SplitOptionsT *SplitOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SplitOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SplitOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SplitOptions::UnPackTo(SplitOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13905,9 +14245,9 @@ inline flatbuffers::Offset CreateSplitOptions(flatbuffers::FlatBuf + } + + inline SplitVOptionsT *SplitVOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SplitVOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SplitVOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SplitVOptions::UnPackTo(SplitVOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13931,9 +14271,9 @@ inline flatbuffers::Offset CreateSplitVOptions(flatbuffers::FlatB + } + + inline StridedSliceOptionsT *StridedSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new StridedSliceOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new StridedSliceOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void StridedSliceOptions::UnPackTo(StridedSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13969,9 +14309,9 @@ inline flatbuffers::Offset CreateStridedSliceOptions(flatbu + } + + inline LogSoftmaxOptionsT *LogSoftmaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LogSoftmaxOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LogSoftmaxOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LogSoftmaxOptions::UnPackTo(LogSoftmaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -13992,9 +14332,9 @@ inline flatbuffers::Offset CreateLogSoftmaxOptions(flatbuffer + } + + inline CastOptionsT *CastOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CastOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CastOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CastOptions::UnPackTo(CastOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14021,9 +14361,9 @@ inline flatbuffers::Offset CreateCastOptions(flatbuffers::FlatBuffe + } + + inline DequantizeOptionsT *DequantizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DequantizeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DequantizeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DequantizeOptions::UnPackTo(DequantizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14044,9 +14384,9 @@ inline flatbuffers::Offset CreateDequantizeOptions(flatbuffer + } + + inline MaximumMinimumOptionsT *MaximumMinimumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MaximumMinimumOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MaximumMinimumOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MaximumMinimumOptions::UnPackTo(MaximumMinimumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14067,9 +14407,9 @@ inline flatbuffers::Offset CreateMaximumMinimumOptions(fl + } + + inline TileOptionsT *TileOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TileOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TileOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TileOptions::UnPackTo(TileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14090,9 +14430,9 @@ inline flatbuffers::Offset CreateTileOptions(flatbuffers::FlatBuffe + } + + inline ArgMaxOptionsT *ArgMaxOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ArgMaxOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ArgMaxOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ArgMaxOptions::UnPackTo(ArgMaxOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14116,9 +14456,9 @@ inline flatbuffers::Offset CreateArgMaxOptions(flatbuffers::FlatB + } + + inline ArgMinOptionsT *ArgMinOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ArgMinOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ArgMinOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ArgMinOptions::UnPackTo(ArgMinOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14142,9 +14482,9 @@ inline flatbuffers::Offset CreateArgMinOptions(flatbuffers::FlatB + } + + inline GreaterOptionsT *GreaterOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GreaterOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GreaterOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GreaterOptions::UnPackTo(GreaterOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14165,9 +14505,9 @@ inline flatbuffers::Offset CreateGreaterOptions(flatbuffers::Fla + } + + inline GreaterEqualOptionsT *GreaterEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GreaterEqualOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GreaterEqualOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GreaterEqualOptions::UnPackTo(GreaterEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14188,9 +14528,9 @@ inline flatbuffers::Offset CreateGreaterEqualOptions(flatbu + } + + inline LessOptionsT *LessOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LessOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LessOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LessOptions::UnPackTo(LessOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14211,9 +14551,9 @@ inline flatbuffers::Offset CreateLessOptions(flatbuffers::FlatBuffe + } + + inline LessEqualOptionsT *LessEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LessEqualOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LessEqualOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LessEqualOptions::UnPackTo(LessEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14234,9 +14574,9 @@ inline flatbuffers::Offset CreateLessEqualOptions(flatbuffers: + } + + inline NegOptionsT *NegOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NegOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NegOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void NegOptions::UnPackTo(NegOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14257,9 +14597,9 @@ inline flatbuffers::Offset CreateNegOptions(flatbuffers::FlatBufferB + } + + inline SelectOptionsT *SelectOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SelectOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SelectOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SelectOptions::UnPackTo(SelectOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14280,9 +14620,9 @@ inline flatbuffers::Offset CreateSelectOptions(flatbuffers::FlatB + } + + inline SliceOptionsT *SliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SliceOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SliceOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SliceOptions::UnPackTo(SliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14303,9 +14643,9 @@ inline flatbuffers::Offset CreateSliceOptions(flatbuffers::FlatBuf + } + + inline TransposeConvOptionsT *TransposeConvOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TransposeConvOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TransposeConvOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TransposeConvOptions::UnPackTo(TransposeConvOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14335,9 +14675,9 @@ inline flatbuffers::Offset CreateTransposeConvOptions(flat + } + + inline ExpandDimsOptionsT *ExpandDimsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ExpandDimsOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ExpandDimsOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ExpandDimsOptions::UnPackTo(ExpandDimsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14358,9 +14698,9 @@ inline flatbuffers::Offset CreateExpandDimsOptions(flatbuffer + } + + inline SparseToDenseOptionsT *SparseToDenseOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SparseToDenseOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SparseToDenseOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SparseToDenseOptions::UnPackTo(SparseToDenseOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14384,9 +14724,9 @@ inline flatbuffers::Offset CreateSparseToDenseOptions(flat + } + + inline EqualOptionsT *EqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new EqualOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new EqualOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void EqualOptions::UnPackTo(EqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14407,9 +14747,9 @@ inline flatbuffers::Offset CreateEqualOptions(flatbuffers::FlatBuf + } + + inline NotEqualOptionsT *NotEqualOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NotEqualOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NotEqualOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void NotEqualOptions::UnPackTo(NotEqualOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14430,9 +14770,9 @@ inline flatbuffers::Offset CreateNotEqualOptions(flatbuffers::F + } + + inline ShapeOptionsT *ShapeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ShapeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ShapeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ShapeOptions::UnPackTo(ShapeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14456,9 +14796,9 @@ inline flatbuffers::Offset CreateShapeOptions(flatbuffers::FlatBuf + } + + inline RankOptionsT *RankOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RankOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RankOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RankOptions::UnPackTo(RankOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14479,9 +14819,9 @@ inline flatbuffers::Offset CreateRankOptions(flatbuffers::FlatBuffe + } + + inline PowOptionsT *PowOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PowOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PowOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PowOptions::UnPackTo(PowOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14502,9 +14842,9 @@ inline flatbuffers::Offset CreatePowOptions(flatbuffers::FlatBufferB + } + + inline FakeQuantOptionsT *FakeQuantOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FakeQuantOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FakeQuantOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void FakeQuantOptions::UnPackTo(FakeQuantOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14537,9 +14877,9 @@ inline flatbuffers::Offset CreateFakeQuantOptions(flatbuffers: + } + + inline PackOptionsT *PackOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new PackOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new PackOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void PackOptions::UnPackTo(PackOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14566,9 +14906,9 @@ inline flatbuffers::Offset CreatePackOptions(flatbuffers::FlatBuffe + } + + inline LogicalOrOptionsT *LogicalOrOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LogicalOrOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LogicalOrOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LogicalOrOptions::UnPackTo(LogicalOrOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14589,9 +14929,9 @@ inline flatbuffers::Offset CreateLogicalOrOptions(flatbuffers: + } + + inline OneHotOptionsT *OneHotOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new OneHotOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new OneHotOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void OneHotOptions::UnPackTo(OneHotOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14615,9 +14955,9 @@ inline flatbuffers::Offset CreateOneHotOptions(flatbuffers::FlatB + } + + inline AbsOptionsT *AbsOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new AbsOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new AbsOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void AbsOptions::UnPackTo(AbsOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14638,9 +14978,9 @@ inline flatbuffers::Offset CreateAbsOptions(flatbuffers::FlatBufferB + } + + inline HardSwishOptionsT *HardSwishOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new HardSwishOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new HardSwishOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void HardSwishOptions::UnPackTo(HardSwishOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14661,9 +15001,9 @@ inline flatbuffers::Offset CreateHardSwishOptions(flatbuffers: + } + + inline LogicalAndOptionsT *LogicalAndOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LogicalAndOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LogicalAndOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LogicalAndOptions::UnPackTo(LogicalAndOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14684,9 +15024,9 @@ inline flatbuffers::Offset CreateLogicalAndOptions(flatbuffer + } + + inline LogicalNotOptionsT *LogicalNotOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LogicalNotOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LogicalNotOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LogicalNotOptions::UnPackTo(LogicalNotOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14707,9 +15047,9 @@ inline flatbuffers::Offset CreateLogicalNotOptions(flatbuffer + } + + inline UnpackOptionsT *UnpackOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new UnpackOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new UnpackOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void UnpackOptions::UnPackTo(UnpackOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14736,9 +15076,9 @@ inline flatbuffers::Offset CreateUnpackOptions(flatbuffers::FlatB + } + + inline FloorDivOptionsT *FloorDivOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FloorDivOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FloorDivOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void FloorDivOptions::UnPackTo(FloorDivOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14759,9 +15099,9 @@ inline flatbuffers::Offset CreateFloorDivOptions(flatbuffers::F + } + + inline SquareOptionsT *SquareOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SquareOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SquareOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SquareOptions::UnPackTo(SquareOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14782,9 +15122,9 @@ inline flatbuffers::Offset CreateSquareOptions(flatbuffers::FlatB + } + + inline ZerosLikeOptionsT *ZerosLikeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ZerosLikeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ZerosLikeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ZerosLikeOptions::UnPackTo(ZerosLikeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14805,9 +15145,9 @@ inline flatbuffers::Offset CreateZerosLikeOptions(flatbuffers: + } + + inline FillOptionsT *FillOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FillOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FillOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void FillOptions::UnPackTo(FillOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14828,9 +15168,9 @@ inline flatbuffers::Offset CreateFillOptions(flatbuffers::FlatBuffe + } + + inline FloorModOptionsT *FloorModOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new FloorModOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new FloorModOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void FloorModOptions::UnPackTo(FloorModOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14851,9 +15191,9 @@ inline flatbuffers::Offset CreateFloorModOptions(flatbuffers::F + } + + inline RangeOptionsT *RangeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RangeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RangeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RangeOptions::UnPackTo(RangeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14874,9 +15214,9 @@ inline flatbuffers::Offset CreateRangeOptions(flatbuffers::FlatBuf + } + + inline LeakyReluOptionsT *LeakyReluOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new LeakyReluOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new LeakyReluOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void LeakyReluOptions::UnPackTo(LeakyReluOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14900,9 +15240,9 @@ inline flatbuffers::Offset CreateLeakyReluOptions(flatbuffers: + } + + inline SquaredDifferenceOptionsT *SquaredDifferenceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SquaredDifferenceOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SquaredDifferenceOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SquaredDifferenceOptions::UnPackTo(SquaredDifferenceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14923,9 +15263,9 @@ inline flatbuffers::Offset CreateSquaredDifferenceOpti + } + + inline MirrorPadOptionsT *MirrorPadOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MirrorPadOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MirrorPadOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MirrorPadOptions::UnPackTo(MirrorPadOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14949,9 +15289,9 @@ inline flatbuffers::Offset CreateMirrorPadOptions(flatbuffers: + } + + inline UniqueOptionsT *UniqueOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new UniqueOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new UniqueOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void UniqueOptions::UnPackTo(UniqueOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14975,9 +15315,9 @@ inline flatbuffers::Offset CreateUniqueOptions(flatbuffers::FlatB + } + + inline ReverseV2OptionsT *ReverseV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReverseV2OptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReverseV2OptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReverseV2Options::UnPackTo(ReverseV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -14998,9 +15338,9 @@ inline flatbuffers::Offset CreateReverseV2Options(flatbuffers: + } + + inline AddNOptionsT *AddNOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new AddNOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new AddNOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void AddNOptions::UnPackTo(AddNOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15021,9 +15361,9 @@ inline flatbuffers::Offset CreateAddNOptions(flatbuffers::FlatBuffe + } + + inline GatherNdOptionsT *GatherNdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GatherNdOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GatherNdOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GatherNdOptions::UnPackTo(GatherNdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15044,9 +15384,9 @@ inline flatbuffers::Offset CreateGatherNdOptions(flatbuffers::F + } + + inline WhereOptionsT *WhereOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new WhereOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new WhereOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void WhereOptions::UnPackTo(WhereOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15067,9 +15407,9 @@ inline flatbuffers::Offset CreateWhereOptions(flatbuffers::FlatBuf + } + + inline ReverseSequenceOptionsT *ReverseSequenceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReverseSequenceOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReverseSequenceOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReverseSequenceOptions::UnPackTo(ReverseSequenceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15096,9 +15436,9 @@ inline flatbuffers::Offset CreateReverseSequenceOptions( + } + + inline MatrixDiagOptionsT *MatrixDiagOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MatrixDiagOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MatrixDiagOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MatrixDiagOptions::UnPackTo(MatrixDiagOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15119,9 +15459,9 @@ inline flatbuffers::Offset CreateMatrixDiagOptions(flatbuffer + } + + inline QuantizeOptionsT *QuantizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new QuantizeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new QuantizeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void QuantizeOptions::UnPackTo(QuantizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15142,9 +15482,9 @@ inline flatbuffers::Offset CreateQuantizeOptions(flatbuffers::F + } + + inline MatrixSetDiagOptionsT *MatrixSetDiagOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MatrixSetDiagOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MatrixSetDiagOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void MatrixSetDiagOptions::UnPackTo(MatrixSetDiagOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15165,9 +15505,9 @@ inline flatbuffers::Offset CreateMatrixSetDiagOptions(flat + } + + inline IfOptionsT *IfOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new IfOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new IfOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void IfOptions::UnPackTo(IfOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15194,9 +15534,9 @@ inline flatbuffers::Offset CreateIfOptions(flatbuffers::FlatBufferBui + } + + inline CallOnceOptionsT *CallOnceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CallOnceOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CallOnceOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CallOnceOptions::UnPackTo(CallOnceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15220,9 +15560,9 @@ inline flatbuffers::Offset CreateCallOnceOptions(flatbuffers::F + } + + inline WhileOptionsT *WhileOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new WhileOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new WhileOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void WhileOptions::UnPackTo(WhileOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15249,9 +15589,9 @@ inline flatbuffers::Offset CreateWhileOptions(flatbuffers::FlatBuf + } + + inline NonMaxSuppressionV4OptionsT *NonMaxSuppressionV4Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NonMaxSuppressionV4OptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NonMaxSuppressionV4OptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void NonMaxSuppressionV4Options::UnPackTo(NonMaxSuppressionV4OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15272,9 +15612,9 @@ inline flatbuffers::Offset CreateNonMaxSuppressionV4 + } + + inline NonMaxSuppressionV5OptionsT *NonMaxSuppressionV5Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new NonMaxSuppressionV5OptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new NonMaxSuppressionV5OptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void NonMaxSuppressionV5Options::UnPackTo(NonMaxSuppressionV5OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15295,9 +15635,9 @@ inline flatbuffers::Offset CreateNonMaxSuppressionV5 + } + + inline ScatterNdOptionsT *ScatterNdOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ScatterNdOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ScatterNdOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ScatterNdOptions::UnPackTo(ScatterNdOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15318,9 +15658,9 @@ inline flatbuffers::Offset CreateScatterNdOptions(flatbuffers: + } + + inline SelectV2OptionsT *SelectV2Options::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SelectV2OptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SelectV2OptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SelectV2Options::UnPackTo(SelectV2OptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15341,9 +15681,9 @@ inline flatbuffers::Offset CreateSelectV2Options(flatbuffers::F + } + + inline DensifyOptionsT *DensifyOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DensifyOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DensifyOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DensifyOptions::UnPackTo(DensifyOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15364,9 +15704,9 @@ inline flatbuffers::Offset CreateDensifyOptions(flatbuffers::Fla + } + + inline SegmentSumOptionsT *SegmentSumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SegmentSumOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SegmentSumOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SegmentSumOptions::UnPackTo(SegmentSumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15387,9 +15727,9 @@ inline flatbuffers::Offset CreateSegmentSumOptions(flatbuffer + } + + inline BatchMatMulOptionsT *BatchMatMulOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BatchMatMulOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BatchMatMulOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BatchMatMulOptions::UnPackTo(BatchMatMulOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15419,9 +15759,9 @@ inline flatbuffers::Offset CreateBatchMatMulOptions(flatbuff + } + + inline CumsumOptionsT *CumsumOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new CumsumOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new CumsumOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void CumsumOptions::UnPackTo(CumsumOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15448,9 +15788,9 @@ inline flatbuffers::Offset CreateCumsumOptions(flatbuffers::FlatB + } + + inline BroadcastToOptionsT *BroadcastToOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BroadcastToOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BroadcastToOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BroadcastToOptions::UnPackTo(BroadcastToOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15471,9 +15811,9 @@ inline flatbuffers::Offset CreateBroadcastToOptions(flatbuff + } + + inline Rfft2dOptionsT *Rfft2dOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new Rfft2dOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new Rfft2dOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Rfft2dOptions::UnPackTo(Rfft2dOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15494,9 +15834,9 @@ inline flatbuffers::Offset CreateRfft2dOptions(flatbuffers::FlatB + } + + inline HashtableOptionsT *HashtableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new HashtableOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new HashtableOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void HashtableOptions::UnPackTo(HashtableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15526,9 +15866,9 @@ inline flatbuffers::Offset CreateHashtableOptions(flatbuffers: + } + + inline HashtableFindOptionsT *HashtableFindOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new HashtableFindOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new HashtableFindOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void HashtableFindOptions::UnPackTo(HashtableFindOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15549,9 +15889,9 @@ inline flatbuffers::Offset CreateHashtableFindOptions(flat + } + + inline HashtableImportOptionsT *HashtableImportOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new HashtableImportOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new HashtableImportOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void HashtableImportOptions::UnPackTo(HashtableImportOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15572,9 +15912,9 @@ inline flatbuffers::Offset CreateHashtableImportOptions( + } + + inline HashtableSizeOptionsT *HashtableSizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new HashtableSizeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new HashtableSizeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void HashtableSizeOptions::UnPackTo(HashtableSizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15595,9 +15935,9 @@ inline flatbuffers::Offset CreateHashtableSizeOptions(flat + } + + inline VarHandleOptionsT *VarHandleOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new VarHandleOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new VarHandleOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void VarHandleOptions::UnPackTo(VarHandleOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15624,9 +15964,9 @@ inline flatbuffers::Offset CreateVarHandleOptions(flatbuffers: + } + + inline ReadVariableOptionsT *ReadVariableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ReadVariableOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ReadVariableOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void ReadVariableOptions::UnPackTo(ReadVariableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15647,9 +15987,9 @@ inline flatbuffers::Offset CreateReadVariableOptions(flatbu + } + + inline AssignVariableOptionsT *AssignVariableOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new AssignVariableOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new AssignVariableOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void AssignVariableOptions::UnPackTo(AssignVariableOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15670,9 +16010,9 @@ inline flatbuffers::Offset CreateAssignVariableOptions(fl + } + + inline RandomOptionsT *RandomOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new RandomOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new RandomOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void RandomOptions::UnPackTo(RandomOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15699,9 +16039,9 @@ inline flatbuffers::Offset CreateRandomOptions(flatbuffers::FlatB + } + + inline BucketizeOptionsT *BucketizeOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BucketizeOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BucketizeOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void BucketizeOptions::UnPackTo(BucketizeOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15725,9 +16065,9 @@ inline flatbuffers::Offset CreateBucketizeOptions(flatbuffers: + } + + inline GeluOptionsT *GeluOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new GeluOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new GeluOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void GeluOptions::UnPackTo(GeluOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15751,9 +16091,9 @@ inline flatbuffers::Offset CreateGeluOptions(flatbuffers::FlatBuffe + } + + inline DynamicUpdateSliceOptionsT *DynamicUpdateSliceOptions::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new DynamicUpdateSliceOptionsT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new DynamicUpdateSliceOptionsT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void DynamicUpdateSliceOptions::UnPackTo(DynamicUpdateSliceOptionsT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15774,9 +16114,9 @@ inline flatbuffers::Offset CreateDynamicUpdateSliceOp + } + + inline OperatorCodeT *OperatorCode::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new OperatorCodeT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new OperatorCodeT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void OperatorCode::UnPackTo(OperatorCodeT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15809,9 +16149,9 @@ inline flatbuffers::Offset CreateOperatorCode(flatbuffers::FlatBuf + } + + inline OperatorT *Operator::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new OperatorT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new OperatorT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Operator::UnPackTo(OperatorT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15859,18 +16199,18 @@ inline flatbuffers::Offset CreateOperator(flatbuffers::FlatBufferBuild + } + + inline SubGraphT *SubGraph::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SubGraphT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SubGraphT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SubGraph::UnPackTo(SubGraphT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = tensors(); if (_e) { _o->tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->tensors[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = tensors(); if (_e) { _o->tensors.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->tensors[_i]) { _e->Get(_i)->UnPackTo(_o->tensors[_i].get(), _resolver); } else { _o->tensors[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + { auto _e = inputs(); if (_e) { _o->inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputs[_i] = _e->Get(_i); } } } + { auto _e = outputs(); if (_e) { _o->outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputs[_i] = _e->Get(_i); } } } +- { auto _e = operators(); if (_e) { _o->operators.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->operators[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = operators(); if (_e) { _o->operators.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->operators[_i]) { _e->Get(_i)->UnPackTo(_o->operators[_i].get(), _resolver); } else { _o->operators[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + { auto _e = name(); if (_e) _o->name = _e->str(); } + } + +@@ -15897,9 +16237,9 @@ inline flatbuffers::Offset CreateSubGraph(flatbuffers::FlatBufferBuild + } + + inline BufferT *Buffer::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new BufferT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new BufferT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Buffer::UnPackTo(BufferT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15924,9 +16264,9 @@ inline flatbuffers::Offset CreateBuffer(flatbuffers::FlatBufferBuilder & + } + + inline MetadataT *Metadata::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new MetadataT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new MetadataT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Metadata::UnPackTo(MetadataT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15953,9 +16293,9 @@ inline flatbuffers::Offset CreateMetadata(flatbuffers::FlatBufferBuild + } + + inline TensorMapT *TensorMap::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new TensorMapT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new TensorMapT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void TensorMap::UnPackTo(TensorMapT *_o, const flatbuffers::resolver_function_t *_resolver) const { +@@ -15982,16 +16322,16 @@ inline flatbuffers::Offset CreateTensorMap(flatbuffers::FlatBufferBui + } + + inline SignatureDefT *SignatureDef::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new SignatureDefT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new SignatureDefT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void SignatureDef::UnPackTo(SignatureDefT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; +- { auto _e = inputs(); if (_e) { _o->inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } +- { auto _e = outputs(); if (_e) { _o->outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = inputs(); if (_e) { _o->inputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->inputs[_i]) { _e->Get(_i)->UnPackTo(_o->inputs[_i].get(), _resolver); } else { _o->inputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } ++ { auto _e = outputs(); if (_e) { _o->outputs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->outputs[_i]) { _e->Get(_i)->UnPackTo(_o->outputs[_i].get(), _resolver); } else { _o->outputs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + { auto _e = signature_key(); if (_e) _o->signature_key = _e->str(); } + { auto _e = subgraph_index(); _o->subgraph_index = _e; } + } +@@ -16017,22 +16357,22 @@ inline flatbuffers::Offset CreateSignatureDef(flatbuffers::FlatBuf + } + + inline ModelT *Model::UnPack(const flatbuffers::resolver_function_t *_resolver) const { +- auto _o = new ModelT(); +- UnPackTo(_o, _resolver); +- return _o; ++ auto _o = std::unique_ptr(new ModelT()); ++ UnPackTo(_o.get(), _resolver); ++ return _o.release(); + } + + inline void Model::UnPackTo(ModelT *_o, const flatbuffers::resolver_function_t *_resolver) const { + (void)_o; + (void)_resolver; + { auto _e = version(); _o->version = _e; } +- { auto _e = operator_codes(); if (_e) { _o->operator_codes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->operator_codes[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } +- { auto _e = subgraphs(); if (_e) { _o->subgraphs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->subgraphs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = operator_codes(); if (_e) { _o->operator_codes.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->operator_codes[_i]) { _e->Get(_i)->UnPackTo(_o->operator_codes[_i].get(), _resolver); } else { _o->operator_codes[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } ++ { auto _e = subgraphs(); if (_e) { _o->subgraphs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->subgraphs[_i]) { _e->Get(_i)->UnPackTo(_o->subgraphs[_i].get(), _resolver); } else { _o->subgraphs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + { auto _e = description(); if (_e) _o->description = _e->str(); } +- { auto _e = buffers(); if (_e) { _o->buffers.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->buffers[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = buffers(); if (_e) { _o->buffers.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->buffers[_i]) { _e->Get(_i)->UnPackTo(_o->buffers[_i].get(), _resolver); } else { _o->buffers[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + { auto _e = metadata_buffer(); if (_e) { _o->metadata_buffer.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->metadata_buffer[_i] = _e->Get(_i); } } } +- { auto _e = metadata(); if (_e) { _o->metadata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->metadata[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } +- { auto _e = signature_defs(); if (_e) { _o->signature_defs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { _o->signature_defs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); } } } ++ { auto _e = metadata(); if (_e) { _o->metadata.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->metadata[_i]) { _e->Get(_i)->UnPackTo(_o->metadata[_i].get(), _resolver); } else { _o->metadata[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } ++ { auto _e = signature_defs(); if (_e) { _o->signature_defs.resize(_e->size()); for (flatbuffers::uoffset_t _i = 0; _i < _e->size(); _i++) { if(_o->signature_defs[_i]) { _e->Get(_i)->UnPackTo(_o->signature_defs[_i].get(), _resolver); } else { _o->signature_defs[_i] = std::unique_ptr(_e->Get(_i)->UnPack(_resolver)); }; } } } + } + + inline flatbuffers::Offset Model::Pack(flatbuffers::FlatBufferBuilder &_fbb, const ModelT* _o, const flatbuffers::rehasher_function_t *_rehasher) { +@@ -16089,6 +16429,7 @@ inline bool VerifyQuantizationDetailsVector(flatbuffers::Verifier &verifier, con + } + + inline void *QuantizationDetailsUnion::UnPack(const void *obj, QuantizationDetails type, const flatbuffers::resolver_function_t *resolver) { ++ (void)resolver; + switch (type) { + case QuantizationDetails_CustomQuantization: { + auto ptr = reinterpret_cast(obj); +@@ -16099,6 +16440,7 @@ inline void *QuantizationDetailsUnion::UnPack(const void *obj, QuantizationDetai + } + + inline flatbuffers::Offset QuantizationDetailsUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { ++ (void)_rehasher; + switch (type) { + case QuantizationDetails_CustomQuantization: { + auto ptr = reinterpret_cast(value); +@@ -16108,7 +16450,7 @@ inline flatbuffers::Offset QuantizationDetailsUnion::Pack(flatbuffers::Fla + } + } + +-inline QuantizationDetailsUnion::QuantizationDetailsUnion(const QuantizationDetailsUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) { ++inline QuantizationDetailsUnion::QuantizationDetailsUnion(const QuantizationDetailsUnion &u) : type(u.type), value(nullptr) { + switch (type) { + case QuantizationDetails_CustomQuantization: { + value = new tflite::CustomQuantizationT(*reinterpret_cast(u.value)); +@@ -16166,6 +16508,7 @@ inline bool VerifySparseIndexVectorVector(flatbuffers::Verifier &verifier, const + } + + inline void *SparseIndexVectorUnion::UnPack(const void *obj, SparseIndexVector type, const flatbuffers::resolver_function_t *resolver) { ++ (void)resolver; + switch (type) { + case SparseIndexVector_Int32Vector: { + auto ptr = reinterpret_cast(obj); +@@ -16184,6 +16527,7 @@ inline void *SparseIndexVectorUnion::UnPack(const void *obj, SparseIndexVector t + } + + inline flatbuffers::Offset SparseIndexVectorUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { ++ (void)_rehasher; + switch (type) { + case SparseIndexVector_Int32Vector: { + auto ptr = reinterpret_cast(value); +@@ -16201,7 +16545,7 @@ inline flatbuffers::Offset SparseIndexVectorUnion::Pack(flatbuffers::FlatB + } + } + +-inline SparseIndexVectorUnion::SparseIndexVectorUnion(const SparseIndexVectorUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) { ++inline SparseIndexVectorUnion::SparseIndexVectorUnion(const SparseIndexVectorUnion &u) : type(u.type), value(nullptr) { + switch (type) { + case SparseIndexVector_Int32Vector: { + value = new tflite::Int32VectorT(*reinterpret_cast(u.value)); +@@ -16733,6 +17077,7 @@ inline bool VerifyBuiltinOptionsVector(flatbuffers::Verifier &verifier, const fl + } + + inline void *BuiltinOptionsUnion::UnPack(const void *obj, BuiltinOptions type, const flatbuffers::resolver_function_t *resolver) { ++ (void)resolver; + switch (type) { + case BuiltinOptions_Conv2DOptions: { + auto ptr = reinterpret_cast(obj); +@@ -17207,6 +17552,7 @@ inline void *BuiltinOptionsUnion::UnPack(const void *obj, BuiltinOptions type, c + } + + inline flatbuffers::Offset BuiltinOptionsUnion::Pack(flatbuffers::FlatBufferBuilder &_fbb, const flatbuffers::rehasher_function_t *_rehasher) const { ++ (void)_rehasher; + switch (type) { + case BuiltinOptions_Conv2DOptions: { + auto ptr = reinterpret_cast(value); +@@ -17680,7 +18026,7 @@ inline flatbuffers::Offset BuiltinOptionsUnion::Pack(flatbuffers::FlatBuff + } + } + +-inline BuiltinOptionsUnion::BuiltinOptionsUnion(const BuiltinOptionsUnion &u) FLATBUFFERS_NOEXCEPT : type(u.type), value(nullptr) { ++inline BuiltinOptionsUnion::BuiltinOptionsUnion(const BuiltinOptionsUnion &u) : type(u.type), value(nullptr) { + switch (type) { + case BuiltinOptions_Conv2DOptions: { + value = new tflite::Conv2DOptionsT(*reinterpret_cast(u.value)); +diff --git a/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake b/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake +index a3d01fd962d..ac91a03a48a 100644 +--- a/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake ++++ b/tensorflow/lite/tools/cmake/modules/flatbuffers.cmake +@@ -23,7 +23,7 @@ OverridableFetchContent_Declare( + flatbuffers + GIT_REPOSITORY https://github.com/google/flatbuffers + # Sync with tensorflow/third_party/flatbuffers/workspace.bzl +- GIT_TAG v1.12.0 ++ GIT_TAG v2.0.5 + GIT_SHALLOW TRUE + GIT_PROGRESS TRUE + SOURCE_DIR "${CMAKE_BINARY_DIR}/flatbuffers" +diff --git a/tensorflow/tools/ci_build/release/requirements_common.txt b/tensorflow/tools/ci_build/release/requirements_common.txt +index 7a9f3fe6ee9..ea6ccf0e912 100644 +--- a/tensorflow/tools/ci_build/release/requirements_common.txt ++++ b/tensorflow/tools/ci_build/release/requirements_common.txt +@@ -4,7 +4,7 @@ + + absl-py ~= 0.13.0 + astunparse ~= 1.6.3 +-flatbuffers < 2.0 # NOTE: We cannot support faltbuffers 2.0 until internal code updates ++flatbuffers ~= 2.0 + google_pasta ~= 0.2 + h5py ~= 3.6.0 # NOTE: Earliest version for Python 3.10 + keras_preprocessing ~= 1.1.2 +diff --git a/tensorflow/tools/pip_package/setup.py b/tensorflow/tools/pip_package/setup.py +index cdcc355f4a6..6ccdbc38bd3 100644 +--- a/tensorflow/tools/pip_package/setup.py ++++ b/tensorflow/tools/pip_package/setup.py +@@ -75,9 +75,7 @@ def standard_or_nightly(standard, nightly): + REQUIRED_PACKAGES = [ + 'absl-py >= 1.0.0', + 'astunparse >= 1.6.0', +- # TODO(b/187981032): remove the constraint for 2.0 once the incompatibile +- # issue is resolved. +- 'flatbuffers >= 1.12, <2', ++ 'flatbuffers >= 2.0', + # TODO(b/213222745) gast versions above 0.4.0 break TF's tests + 'gast >= 0.2.1, <= 0.4.0', + 'google_pasta >= 0.1.1', +diff --git a/third_party/flatbuffers/build_defs.bzl b/third_party/flatbuffers/build_defs.bzl +index 754db3f5d86..9fe15a3747f 100644 +--- a/third_party/flatbuffers/build_defs.bzl ++++ b/third_party/flatbuffers/build_defs.bzl +@@ -279,6 +279,11 @@ def _gen_flatbuffer_srcs_impl(ctx): + else: + no_includes_statement = [] + ++ if ctx.attr.language_flag == "--python": ++ onefile_statement = ["--gen-onefile"] ++ else: ++ onefile_statement = [] ++ + # Need to generate all files in a directory. + if not outputs: + outputs = [ctx.actions.declare_directory("{}_all".format(ctx.attr.name))] +@@ -314,6 +319,7 @@ def _gen_flatbuffer_srcs_impl(ctx): + "-I", + ctx.bin_dir.path, + ] + no_includes_statement + ++ onefile_statement + + include_paths_cmd_line + [ + "--no-union-value-namespacing", + "--gen-object-api", +@@ -433,6 +439,8 @@ def flatbuffer_py_library( + deps = deps, + include_paths = include_paths, + ) ++ ++ # TODO(b/235550563): Remove the concatnation rule with 2.0.6 update. + all_srcs_no_include = "{}_srcs_no_include".format(name) + _gen_flatbuffer_srcs( + name = all_srcs_no_include, +diff --git a/third_party/flatbuffers/flatbuffers.BUILD b/third_party/flatbuffers/flatbuffers.BUILD +index 108c0cd8e3b..f32f1a5f324 100644 +--- a/third_party/flatbuffers/flatbuffers.BUILD ++++ b/third_party/flatbuffers/flatbuffers.BUILD +@@ -10,10 +10,15 @@ exports_files(["LICENSE.txt"]) + licenses(["notice"]) + + config_setting( +- name = "freebsd", ++ name = "platform_freebsd", + values = {"cpu": "freebsd"}, + ) + ++config_setting( ++ name = "platform_openbsd", ++ values = {"cpu": "openbsd"}, ++) ++ + config_setting( + name = "windows", + values = {"cpu": "x64_windows"}, +@@ -35,8 +40,16 @@ cc_library( + filegroup( + name = "public_headers", + srcs = [ ++ "include/flatbuffers/allocator.h", ++ "include/flatbuffers/array.h", + "include/flatbuffers/base.h", ++ "include/flatbuffers/bfbs_generator.h", ++ "include/flatbuffers/buffer.h", ++ "include/flatbuffers/buffer_ref.h", + "include/flatbuffers/code_generators.h", ++ "include/flatbuffers/default_allocator.h", ++ "include/flatbuffers/detached_buffer.h", ++ "include/flatbuffers/flatbuffer_builder.h", + "include/flatbuffers/flatbuffers.h", + "include/flatbuffers/flexbuffers.h", + "include/flatbuffers/hash.h", +@@ -46,7 +59,13 @@ filegroup( + "include/flatbuffers/reflection_generated.h", + "include/flatbuffers/registry.h", + "include/flatbuffers/stl_emulation.h", ++ "include/flatbuffers/string.h", ++ "include/flatbuffers/struct.h", ++ "include/flatbuffers/table.h", + "include/flatbuffers/util.h", ++ "include/flatbuffers/vector.h", ++ "include/flatbuffers/vector_downward.h", ++ "include/flatbuffers/verifier.h", + ], + visibility = ["//:__subpackages__"], + ) +@@ -65,7 +84,7 @@ cc_library( + cc_binary( + name = "flatc", + linkopts = select({ +- ":freebsd": [ ++ ":platform_freebsd": [ + "-lm", + ], + ":windows": [], +@@ -92,11 +111,24 @@ filegroup( + cc_library( + name = "runtime_cc", + hdrs = [ ++ "include/flatbuffers/allocator.h", ++ "include/flatbuffers/array.h", + "include/flatbuffers/base.h", ++ "include/flatbuffers/buffer.h", ++ "include/flatbuffers/buffer_ref.h", ++ "include/flatbuffers/default_allocator.h", ++ "include/flatbuffers/detached_buffer.h", ++ "include/flatbuffers/flatbuffer_builder.h", + "include/flatbuffers/flatbuffers.h", + "include/flatbuffers/flexbuffers.h", + "include/flatbuffers/stl_emulation.h", ++ "include/flatbuffers/string.h", ++ "include/flatbuffers/struct.h", ++ "include/flatbuffers/table.h", + "include/flatbuffers/util.h", ++ "include/flatbuffers/vector.h", ++ "include/flatbuffers/vector_downward.h", ++ "include/flatbuffers/verifier.h", + ], + linkstatic = 1, + strip_include_prefix = "/include", +@@ -107,9 +139,11 @@ flatbuffer_py_strip_prefix_srcs( + name = "flatbuffer_py_strip_prefix", + srcs = [ + "python/flatbuffers/__init__.py", ++ "python/flatbuffers/_version.py", + "python/flatbuffers/builder.py", + "python/flatbuffers/compat.py", + "python/flatbuffers/encode.py", ++ "python/flatbuffers/flexbuffers.py", + "python/flatbuffers/number_types.py", + "python/flatbuffers/packer.py", + "python/flatbuffers/table.py", +@@ -122,9 +156,11 @@ filegroup( + name = "runtime_py_srcs", + srcs = [ + "__init__.py", ++ "_version.py", + "builder.py", + "compat.py", + "encode.py", ++ "flexbuffers.py", + "number_types.py", + "packer.py", + "table.py", +diff --git a/third_party/flatbuffers/workspace.bzl b/third_party/flatbuffers/workspace.bzl +index 59c1fd9ea43..84aae9dc51f 100644 +--- a/third_party/flatbuffers/workspace.bzl ++++ b/third_party/flatbuffers/workspace.bzl +@@ -5,9 +5,9 @@ load("//third_party:repo.bzl", "tf_http_archive", "tf_mirror_urls") + def repo(): + tf_http_archive( + name = "flatbuffers", +- strip_prefix = "flatbuffers-1.12.0", +- sha256 = "62f2223fb9181d1d6338451375628975775f7522185266cd5296571ac152bc45", +- urls = tf_mirror_urls("https://github.com/google/flatbuffers/archive/v1.12.0.tar.gz"), ++ strip_prefix = "flatbuffers-2.0.5", ++ sha256 = "b01e97c988c429e164c5c7df9e87c80007ca87f593c0d73733ba536ddcbc8f98", ++ urls = tf_mirror_urls("https://github.com/google/flatbuffers/archive/v2.0.5.tar.gz"), + build_file = "//third_party/flatbuffers:flatbuffers.BUILD", + system_build_file = "//third_party/flatbuffers:BUILD.system", + link_files = {