From 10a6d23f3c0f16cb4dd721a85aa4196c65ce168f Mon Sep 17 00:00:00 2001 From: Misha Gutman Date: Sun, 15 Feb 2026 13:28:19 -0800 Subject: [PATCH] Replaced XNNPACK fp16 rewrite with delegate side fp16 rewrite. PiperOrigin-RevId: 870564355 --- BUILD.bazel | 1 - bench/subgraph/BUILD | 6 + bench/subgraph/CMakeLists.txt | 4 + bench/subgraph/fp16-mobilenet-v1.cc | 1551 +++++++ bench/subgraph/fp16-mobilenet-v2.cc | 3172 +++++++++++++ bench/subgraph/fp16-mobilenet-v3-large.cc | 4886 +++++++++++++++++++++ bench/subgraph/fp16-mobilenet-v3-small.cc | 4298 ++++++++++++++++++ bench/subgraph/mobilenet.cc | 13 +- bench/subgraph/models.h | 5 +- include/experimental.h | 2 +- include/xnnpack.h | 24 +- src/runtime.c | 18 +- src/subgraph.c | 565 --- src/subgraph/subgraph-utils.c | 11 +- src/tensor.c | 1 - src/xnnpack/subgraph.h | 24 +- test/subgraph/BUILD | 26 +- test/subgraph/CMakeLists.txt | 1 - test/subgraph/subgraph-fp16.cc | 1408 ------ test/subgraph/subgraph-tester.cc | 12 - test/subgraph/subgraph-tester.h | 4 - ynnpack/xnnpack/subgraph.cc | 5 - 22 files changed, 13940 insertions(+), 2097 deletions(-) create mode 100644 bench/subgraph/fp16-mobilenet-v1.cc create mode 100644 bench/subgraph/fp16-mobilenet-v2.cc create mode 100644 bench/subgraph/fp16-mobilenet-v3-large.cc create mode 100644 bench/subgraph/fp16-mobilenet-v3-small.cc delete mode 100644 test/subgraph/subgraph-fp16.cc diff --git a/BUILD.bazel b/BUILD.bazel index dd1a4827b8e..53513817ffd 100644 --- a/BUILD.bazel +++ b/BUILD.bazel @@ -905,7 +905,6 @@ xnnpack_cc_library( ":xnnpack_h", "//src/configs:config_hdrs", "//src/configs:hardware_config", - "//src/configs:microkernel_configs", "@pthreadpool", ], ) diff --git a/bench/subgraph/BUILD b/bench/subgraph/BUILD index 39ad7073c3d..71bae125d29 100644 --- a/bench/subgraph/BUILD +++ b/bench/subgraph/BUILD @@ -76,6 +76,10 @@ xnnpack_cxx_library( name = "models", testonly = 1, srcs = [ + "fp16-mobilenet-v1.cc", + "fp16-mobilenet-v2.cc", + "fp16-mobilenet-v3-large.cc", + "fp16-mobilenet-v3-small.cc", "fp32-mobilenet-v1.cc", "fp32-mobilenet-v2.cc", "fp32-mobilenet-v3-large.cc", @@ -89,6 +93,8 @@ xnnpack_cxx_library( ], deps = [ "//:XNNPACK", + "//:fp16", + "//:math", "//test:replicable_random_device", ], ) diff --git a/bench/subgraph/CMakeLists.txt b/bench/subgraph/CMakeLists.txt index 38e96f14fcc..da96834a448 100644 --- a/bench/subgraph/CMakeLists.txt +++ b/bench/subgraph/CMakeLists.txt @@ -9,6 +9,10 @@ IF(XNNPACK_BUILD_LIBRARY) # ---[ Build end-to-end microbenchmarks ADD_LIBRARY(models STATIC + fp16-mobilenet-v1.cc + fp16-mobilenet-v2.cc + fp16-mobilenet-v3-large.cc + fp16-mobilenet-v3-small.cc fp32-mobilenet-v1.cc fp32-mobilenet-v2.cc fp32-mobilenet-v3-large.cc diff --git a/bench/subgraph/fp16-mobilenet-v1.cc b/bench/subgraph/fp16-mobilenet-v1.cc new file mode 100644 index 00000000000..4223dc40274 --- /dev/null +++ b/bench/subgraph/fp16-mobilenet-v1.cc @@ -0,0 +1,1551 @@ +// Copyright 2020-2025 Google LLC +// +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. +// +// Auto-generated file. Do not edit! + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "bench/subgraph/models.h" +#include "include/xnnpack.h" +#include "test/replicable_random_device.h" + +// align a size up to XNN_EXTRA_BYTES +#define XNN_PAD_EXTRA_BYTES(s, t) \ + (((s) + XNN_EXTRA_BYTES / sizeof(t) - 1) & ~(XNN_EXTRA_BYTES / sizeof(t) - 1)) + +namespace models { + +xnn_subgraph_t FP16MobileNetV1() { + xnn_status status; + xnn_subgraph_t subgraph = nullptr; + status = xnn_create_subgraph(/*num_external_values=*/2, 0, &subgraph); + if (status != xnn_status_success) { + std::cerr << "failed to create subgrpah" << std::endl; + return nullptr; + } + + xnnpack::ReplicableRandomDevice rng; + + uint32_t v0 = XNN_INVALID_VALUE_ID; + std::array v0_dims = {{1, 224, 224, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v0_dims.size(), v0_dims.data(), + /*data=*/nullptr, 0, XNN_VALUE_FLAG_EXTERNAL_INPUT, &v0); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v0" << std::endl; + return nullptr; + } + + uint32_t v1 = XNN_INVALID_VALUE_ID; + std::array v1_dims = {{1, 112, 112, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v1_dims.size(), v1_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v1); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v1" << std::endl; + return nullptr; + } + + uint32_t v2 = XNN_INVALID_VALUE_ID; + std::array v2_dims = {{1, 112, 112, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v2_dims.size(), v2_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v2); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v2" << std::endl; + return nullptr; + } + + uint32_t v3 = XNN_INVALID_VALUE_ID; + std::array v3_dims = {{1, 112, 112, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v3_dims.size(), v3_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v3); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v3" << std::endl; + return nullptr; + } + + uint32_t v4 = XNN_INVALID_VALUE_ID; + std::array v4_dims = {{1, 56, 56, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v4_dims.size(), v4_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v4); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v4" << std::endl; + return nullptr; + } + + uint32_t v5 = XNN_INVALID_VALUE_ID; + std::array v5_dims = {{1, 56, 56, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v5_dims.size(), v5_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v5); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v5" << std::endl; + return nullptr; + } + + uint32_t v6 = XNN_INVALID_VALUE_ID; + std::array v6_dims = {{1, 56, 56, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v6_dims.size(), v6_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v6); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v6" << std::endl; + return nullptr; + } + + uint32_t v7 = XNN_INVALID_VALUE_ID; + std::array v7_dims = {{1, 56, 56, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v7_dims.size(), v7_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v7); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v7" << std::endl; + return nullptr; + } + + uint32_t v8 = XNN_INVALID_VALUE_ID; + std::array v8_dims = {{1, 28, 28, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v8_dims.size(), v8_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v8); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v8" << std::endl; + return nullptr; + } + + uint32_t v9 = XNN_INVALID_VALUE_ID; + std::array v9_dims = {{1, 28, 28, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v9_dims.size(), v9_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v9); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v9" << std::endl; + return nullptr; + } + + uint32_t v10 = XNN_INVALID_VALUE_ID; + std::array v10_dims = {{1, 28, 28, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v10_dims.size(), v10_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v10); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v10" << std::endl; + return nullptr; + } + + uint32_t v11 = XNN_INVALID_VALUE_ID; + std::array v11_dims = {{1, 28, 28, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v11_dims.size(), v11_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v11); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v11" << std::endl; + return nullptr; + } + + uint32_t v12 = XNN_INVALID_VALUE_ID; + std::array v12_dims = {{1, 14, 14, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v12_dims.size(), v12_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v12); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v12" << std::endl; + return nullptr; + } + + uint32_t v13 = XNN_INVALID_VALUE_ID; + std::array v13_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v13_dims.size(), v13_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v13); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v13" << std::endl; + return nullptr; + } + + uint32_t v14 = XNN_INVALID_VALUE_ID; + std::array v14_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v14_dims.size(), v14_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v14); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v14" << std::endl; + return nullptr; + } + + uint32_t v15 = XNN_INVALID_VALUE_ID; + std::array v15_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v15_dims.size(), v15_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v15); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v15" << std::endl; + return nullptr; + } + + uint32_t v16 = XNN_INVALID_VALUE_ID; + std::array v16_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v16_dims.size(), v16_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v16); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v16" << std::endl; + return nullptr; + } + + uint32_t v17 = XNN_INVALID_VALUE_ID; + std::array v17_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v17_dims.size(), v17_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v17); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v17" << std::endl; + return nullptr; + } + + uint32_t v18 = XNN_INVALID_VALUE_ID; + std::array v18_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v18_dims.size(), v18_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v18); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v18" << std::endl; + return nullptr; + } + + uint32_t v19 = XNN_INVALID_VALUE_ID; + std::array v19_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v19_dims.size(), v19_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v19); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v19" << std::endl; + return nullptr; + } + + uint32_t v20 = XNN_INVALID_VALUE_ID; + std::array v20_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v20_dims.size(), v20_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v20); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v20" << std::endl; + return nullptr; + } + + uint32_t v21 = XNN_INVALID_VALUE_ID; + std::array v21_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v21_dims.size(), v21_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v21); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v21" << std::endl; + return nullptr; + } + + uint32_t v22 = XNN_INVALID_VALUE_ID; + std::array v22_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v22_dims.size(), v22_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v22); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v22" << std::endl; + return nullptr; + } + + uint32_t v23 = XNN_INVALID_VALUE_ID; + std::array v23_dims = {{1, 14, 14, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v23_dims.size(), v23_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v23); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v23" << std::endl; + return nullptr; + } + + uint32_t v24 = XNN_INVALID_VALUE_ID; + std::array v24_dims = {{1, 7, 7, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v24_dims.size(), v24_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v24); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v24" << std::endl; + return nullptr; + } + + uint32_t v25 = XNN_INVALID_VALUE_ID; + std::array v25_dims = {{1, 7, 7, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v25_dims.size(), v25_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v25); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v25" << std::endl; + return nullptr; + } + + uint32_t v26 = XNN_INVALID_VALUE_ID; + std::array v26_dims = {{1, 7, 7, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v26_dims.size(), v26_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v26); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v26" << std::endl; + return nullptr; + } + + uint32_t v27 = XNN_INVALID_VALUE_ID; + std::array v27_dims = {{1, 7, 7, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v27_dims.size(), v27_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v27); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v27" << std::endl; + return nullptr; + } + + uint32_t v28 = XNN_INVALID_VALUE_ID; + std::array v28_dims = {{1, 1, 1, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v28_dims.size(), v28_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v28); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v28" << std::endl; + return nullptr; + } + + uint32_t v29 = XNN_INVALID_VALUE_ID; + std::array v29_dims = {{1, 1, 1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v29_dims.size(), v29_dims.data(), + /*data=*/nullptr, 1, XNN_VALUE_FLAG_EXTERNAL_OUTPUT, &v29); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v29" << std::endl; + return nullptr; + } + + static std::vector w30_data; + w30_data.resize(XNN_PAD_EXTRA_BYTES(864, float)); + uint32_t w30 = XNN_INVALID_VALUE_ID; + std::array w30_dims = {{32, 3, 3, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w30_dims.size(), w30_dims.data(), + /*data=*/w30_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w30); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w30" << std::endl; + return nullptr; + } + + static std::vector w31_data; + w31_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w31 = XNN_INVALID_VALUE_ID; + std::array w31_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w31_dims.size(), w31_dims.data(), + /*data=*/w31_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w31); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w31" << std::endl; + return nullptr; + } + + static std::vector w32_data; + w32_data.resize(XNN_PAD_EXTRA_BYTES(288, float)); + uint32_t w32 = XNN_INVALID_VALUE_ID; + std::array w32_dims = {{1, 3, 3, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w32_dims.size(), w32_dims.data(), + /*data=*/w32_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w32); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w32" << std::endl; + return nullptr; + } + + static std::vector w33_data; + w33_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w33 = XNN_INVALID_VALUE_ID; + std::array w33_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w33_dims.size(), w33_dims.data(), + /*data=*/w33_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w33); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w33" << std::endl; + return nullptr; + } + + static std::vector w34_data; + w34_data.resize(XNN_PAD_EXTRA_BYTES(2048, float)); + uint32_t w34 = XNN_INVALID_VALUE_ID; + std::array w34_dims = {{64, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w34_dims.size(), w34_dims.data(), + /*data=*/w34_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w34); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w34" << std::endl; + return nullptr; + } + + static std::vector w35_data; + w35_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w35 = XNN_INVALID_VALUE_ID; + std::array w35_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w35_dims.size(), w35_dims.data(), + /*data=*/w35_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w35); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w35" << std::endl; + return nullptr; + } + + static std::vector w36_data; + w36_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w36 = XNN_INVALID_VALUE_ID; + std::array w36_dims = {{1, 3, 3, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w36_dims.size(), w36_dims.data(), + /*data=*/w36_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w36); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w36" << std::endl; + return nullptr; + } + + static std::vector w37_data; + w37_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w37 = XNN_INVALID_VALUE_ID; + std::array w37_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w37_dims.size(), w37_dims.data(), + /*data=*/w37_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w37); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w37" << std::endl; + return nullptr; + } + + static std::vector w38_data; + w38_data.resize(XNN_PAD_EXTRA_BYTES(8192, float)); + uint32_t w38 = XNN_INVALID_VALUE_ID; + std::array w38_dims = {{128, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w38_dims.size(), w38_dims.data(), + /*data=*/w38_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w38); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w38" << std::endl; + return nullptr; + } + + static std::vector w39_data; + w39_data.resize(XNN_PAD_EXTRA_BYTES(128, float)); + uint32_t w39 = XNN_INVALID_VALUE_ID; + std::array w39_dims = {{128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w39_dims.size(), w39_dims.data(), + /*data=*/w39_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w39); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w39" << std::endl; + return nullptr; + } + + static std::vector w40_data; + w40_data.resize(XNN_PAD_EXTRA_BYTES(1152, float)); + uint32_t w40 = XNN_INVALID_VALUE_ID; + std::array w40_dims = {{1, 3, 3, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w40_dims.size(), w40_dims.data(), + /*data=*/w40_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w40); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w40" << std::endl; + return nullptr; + } + + static std::vector w41_data; + w41_data.resize(XNN_PAD_EXTRA_BYTES(128, float)); + uint32_t w41 = XNN_INVALID_VALUE_ID; + std::array w41_dims = {{128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w41_dims.size(), w41_dims.data(), + /*data=*/w41_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w41); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w41" << std::endl; + return nullptr; + } + + static std::vector w42_data; + w42_data.resize(XNN_PAD_EXTRA_BYTES(16384, float)); + uint32_t w42 = XNN_INVALID_VALUE_ID; + std::array w42_dims = {{128, 1, 1, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w42_dims.size(), w42_dims.data(), + /*data=*/w42_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w42); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w42" << std::endl; + return nullptr; + } + + static std::vector w43_data; + w43_data.resize(XNN_PAD_EXTRA_BYTES(128, float)); + uint32_t w43 = XNN_INVALID_VALUE_ID; + std::array w43_dims = {{128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w43_dims.size(), w43_dims.data(), + /*data=*/w43_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w43); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w43" << std::endl; + return nullptr; + } + + static std::vector w44_data; + w44_data.resize(XNN_PAD_EXTRA_BYTES(1152, float)); + uint32_t w44 = XNN_INVALID_VALUE_ID; + std::array w44_dims = {{1, 3, 3, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w44_dims.size(), w44_dims.data(), + /*data=*/w44_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w44); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w44" << std::endl; + return nullptr; + } + + static std::vector w45_data; + w45_data.resize(XNN_PAD_EXTRA_BYTES(128, float)); + uint32_t w45 = XNN_INVALID_VALUE_ID; + std::array w45_dims = {{128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w45_dims.size(), w45_dims.data(), + /*data=*/w45_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w45); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w45" << std::endl; + return nullptr; + } + + static std::vector w46_data; + w46_data.resize(XNN_PAD_EXTRA_BYTES(32768, float)); + uint32_t w46 = XNN_INVALID_VALUE_ID; + std::array w46_dims = {{256, 1, 1, 128}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w46_dims.size(), w46_dims.data(), + /*data=*/w46_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w46); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w46" << std::endl; + return nullptr; + } + + static std::vector w47_data; + w47_data.resize(XNN_PAD_EXTRA_BYTES(256, float)); + uint32_t w47 = XNN_INVALID_VALUE_ID; + std::array w47_dims = {{256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w47_dims.size(), w47_dims.data(), + /*data=*/w47_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w47); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w47" << std::endl; + return nullptr; + } + + static std::vector w48_data; + w48_data.resize(XNN_PAD_EXTRA_BYTES(2304, float)); + uint32_t w48 = XNN_INVALID_VALUE_ID; + std::array w48_dims = {{1, 3, 3, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w48_dims.size(), w48_dims.data(), + /*data=*/w48_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w48); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w48" << std::endl; + return nullptr; + } + + static std::vector w49_data; + w49_data.resize(XNN_PAD_EXTRA_BYTES(256, float)); + uint32_t w49 = XNN_INVALID_VALUE_ID; + std::array w49_dims = {{256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w49_dims.size(), w49_dims.data(), + /*data=*/w49_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w49); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w49" << std::endl; + return nullptr; + } + + static std::vector w50_data; + w50_data.resize(XNN_PAD_EXTRA_BYTES(65536, float)); + uint32_t w50 = XNN_INVALID_VALUE_ID; + std::array w50_dims = {{256, 1, 1, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w50_dims.size(), w50_dims.data(), + /*data=*/w50_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w50); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w50" << std::endl; + return nullptr; + } + + static std::vector w51_data; + w51_data.resize(XNN_PAD_EXTRA_BYTES(256, float)); + uint32_t w51 = XNN_INVALID_VALUE_ID; + std::array w51_dims = {{256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w51_dims.size(), w51_dims.data(), + /*data=*/w51_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w51); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w51" << std::endl; + return nullptr; + } + + static std::vector w52_data; + w52_data.resize(XNN_PAD_EXTRA_BYTES(2304, float)); + uint32_t w52 = XNN_INVALID_VALUE_ID; + std::array w52_dims = {{1, 3, 3, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w52_dims.size(), w52_dims.data(), + /*data=*/w52_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w52); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w52" << std::endl; + return nullptr; + } + + static std::vector w53_data; + w53_data.resize(XNN_PAD_EXTRA_BYTES(256, float)); + uint32_t w53 = XNN_INVALID_VALUE_ID; + std::array w53_dims = {{256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w53_dims.size(), w53_dims.data(), + /*data=*/w53_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w53); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w53" << std::endl; + return nullptr; + } + + static std::vector w54_data; + w54_data.resize(XNN_PAD_EXTRA_BYTES(131072, float)); + uint32_t w54 = XNN_INVALID_VALUE_ID; + std::array w54_dims = {{512, 1, 1, 256}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w54_dims.size(), w54_dims.data(), + /*data=*/w54_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w54); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w54" << std::endl; + return nullptr; + } + + static std::vector w55_data; + w55_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w55 = XNN_INVALID_VALUE_ID; + std::array w55_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w55_dims.size(), w55_dims.data(), + /*data=*/w55_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w55); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w55" << std::endl; + return nullptr; + } + + static std::vector w56_data; + w56_data.resize(XNN_PAD_EXTRA_BYTES(4608, float)); + uint32_t w56 = XNN_INVALID_VALUE_ID; + std::array w56_dims = {{1, 3, 3, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w56_dims.size(), w56_dims.data(), + /*data=*/w56_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w56); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w56" << std::endl; + return nullptr; + } + + static std::vector w57_data; + w57_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w57 = XNN_INVALID_VALUE_ID; + std::array w57_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w57_dims.size(), w57_dims.data(), + /*data=*/w57_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w57); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w57" << std::endl; + return nullptr; + } + + static std::vector w58_data; + w58_data.resize(XNN_PAD_EXTRA_BYTES(262144, float)); + uint32_t w58 = XNN_INVALID_VALUE_ID; + std::array w58_dims = {{512, 1, 1, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w58_dims.size(), w58_dims.data(), + /*data=*/w58_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w58); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w58" << std::endl; + return nullptr; + } + + static std::vector w59_data; + w59_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w59 = XNN_INVALID_VALUE_ID; + std::array w59_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w59_dims.size(), w59_dims.data(), + /*data=*/w59_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w59); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w59" << std::endl; + return nullptr; + } + + static std::vector w60_data; + w60_data.resize(XNN_PAD_EXTRA_BYTES(4608, float)); + uint32_t w60 = XNN_INVALID_VALUE_ID; + std::array w60_dims = {{1, 3, 3, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w60_dims.size(), w60_dims.data(), + /*data=*/w60_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w60); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w60" << std::endl; + return nullptr; + } + + static std::vector w61_data; + w61_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w61 = XNN_INVALID_VALUE_ID; + std::array w61_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w61_dims.size(), w61_dims.data(), + /*data=*/w61_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w61); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w61" << std::endl; + return nullptr; + } + + static std::vector w62_data; + w62_data.resize(XNN_PAD_EXTRA_BYTES(262144, float)); + uint32_t w62 = XNN_INVALID_VALUE_ID; + std::array w62_dims = {{512, 1, 1, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w62_dims.size(), w62_dims.data(), + /*data=*/w62_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w62); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w62" << std::endl; + return nullptr; + } + + static std::vector w63_data; + w63_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w63 = XNN_INVALID_VALUE_ID; + std::array w63_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w63_dims.size(), w63_dims.data(), + /*data=*/w63_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w63); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w63" << std::endl; + return nullptr; + } + + static std::vector w64_data; + w64_data.resize(XNN_PAD_EXTRA_BYTES(4608, float)); + uint32_t w64 = XNN_INVALID_VALUE_ID; + std::array w64_dims = {{1, 3, 3, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w64_dims.size(), w64_dims.data(), + /*data=*/w64_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w64); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w64" << std::endl; + return nullptr; + } + + static std::vector w65_data; + w65_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w65 = XNN_INVALID_VALUE_ID; + std::array w65_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w65_dims.size(), w65_dims.data(), + /*data=*/w65_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w65); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w65" << std::endl; + return nullptr; + } + + static std::vector w66_data; + w66_data.resize(XNN_PAD_EXTRA_BYTES(262144, float)); + uint32_t w66 = XNN_INVALID_VALUE_ID; + std::array w66_dims = {{512, 1, 1, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w66_dims.size(), w66_dims.data(), + /*data=*/w66_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w66); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w66" << std::endl; + return nullptr; + } + + static std::vector w67_data; + w67_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w67 = XNN_INVALID_VALUE_ID; + std::array w67_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w67_dims.size(), w67_dims.data(), + /*data=*/w67_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w67); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w67" << std::endl; + return nullptr; + } + + static std::vector w68_data; + w68_data.resize(XNN_PAD_EXTRA_BYTES(4608, float)); + uint32_t w68 = XNN_INVALID_VALUE_ID; + std::array w68_dims = {{1, 3, 3, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w68_dims.size(), w68_dims.data(), + /*data=*/w68_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w68); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w68" << std::endl; + return nullptr; + } + + static std::vector w69_data; + w69_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w69 = XNN_INVALID_VALUE_ID; + std::array w69_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w69_dims.size(), w69_dims.data(), + /*data=*/w69_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w69); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w69" << std::endl; + return nullptr; + } + + static std::vector w70_data; + w70_data.resize(XNN_PAD_EXTRA_BYTES(262144, float)); + uint32_t w70 = XNN_INVALID_VALUE_ID; + std::array w70_dims = {{512, 1, 1, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w70_dims.size(), w70_dims.data(), + /*data=*/w70_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w70); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w70" << std::endl; + return nullptr; + } + + static std::vector w71_data; + w71_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w71 = XNN_INVALID_VALUE_ID; + std::array w71_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w71_dims.size(), w71_dims.data(), + /*data=*/w71_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w71); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w71" << std::endl; + return nullptr; + } + + static std::vector w72_data; + w72_data.resize(XNN_PAD_EXTRA_BYTES(4608, float)); + uint32_t w72 = XNN_INVALID_VALUE_ID; + std::array w72_dims = {{1, 3, 3, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w72_dims.size(), w72_dims.data(), + /*data=*/w72_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w72); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w72" << std::endl; + return nullptr; + } + + static std::vector w73_data; + w73_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w73 = XNN_INVALID_VALUE_ID; + std::array w73_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w73_dims.size(), w73_dims.data(), + /*data=*/w73_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w73); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w73" << std::endl; + return nullptr; + } + + static std::vector w74_data; + w74_data.resize(XNN_PAD_EXTRA_BYTES(262144, float)); + uint32_t w74 = XNN_INVALID_VALUE_ID; + std::array w74_dims = {{512, 1, 1, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w74_dims.size(), w74_dims.data(), + /*data=*/w74_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w74); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w74" << std::endl; + return nullptr; + } + + static std::vector w75_data; + w75_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w75 = XNN_INVALID_VALUE_ID; + std::array w75_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w75_dims.size(), w75_dims.data(), + /*data=*/w75_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w75); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w75" << std::endl; + return nullptr; + } + + static std::vector w76_data; + w76_data.resize(XNN_PAD_EXTRA_BYTES(4608, float)); + uint32_t w76 = XNN_INVALID_VALUE_ID; + std::array w76_dims = {{1, 3, 3, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w76_dims.size(), w76_dims.data(), + /*data=*/w76_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w76); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w76" << std::endl; + return nullptr; + } + + static std::vector w77_data; + w77_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w77 = XNN_INVALID_VALUE_ID; + std::array w77_dims = {{512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w77_dims.size(), w77_dims.data(), + /*data=*/w77_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w77); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w77" << std::endl; + return nullptr; + } + + static std::vector w78_data; + w78_data.resize(XNN_PAD_EXTRA_BYTES(524288, float)); + uint32_t w78 = XNN_INVALID_VALUE_ID; + std::array w78_dims = {{1024, 1, 1, 512}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w78_dims.size(), w78_dims.data(), + /*data=*/w78_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w78); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w78" << std::endl; + return nullptr; + } + + static std::vector w79_data; + w79_data.resize(XNN_PAD_EXTRA_BYTES(1024, float)); + uint32_t w79 = XNN_INVALID_VALUE_ID; + std::array w79_dims = {{1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w79_dims.size(), w79_dims.data(), + /*data=*/w79_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w79); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w79" << std::endl; + return nullptr; + } + + static std::vector w80_data; + w80_data.resize(XNN_PAD_EXTRA_BYTES(9216, float)); + uint32_t w80 = XNN_INVALID_VALUE_ID; + std::array w80_dims = {{1, 3, 3, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w80_dims.size(), w80_dims.data(), + /*data=*/w80_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w80); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w80" << std::endl; + return nullptr; + } + + static std::vector w81_data; + w81_data.resize(XNN_PAD_EXTRA_BYTES(1024, float)); + uint32_t w81 = XNN_INVALID_VALUE_ID; + std::array w81_dims = {{1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w81_dims.size(), w81_dims.data(), + /*data=*/w81_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w81); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w81" << std::endl; + return nullptr; + } + + static std::vector w82_data; + w82_data.resize(XNN_PAD_EXTRA_BYTES(1048576, float)); + uint32_t w82 = XNN_INVALID_VALUE_ID; + std::array w82_dims = {{1024, 1, 1, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w82_dims.size(), w82_dims.data(), + /*data=*/w82_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w82); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w82" << std::endl; + return nullptr; + } + + static std::vector w83_data; + w83_data.resize(XNN_PAD_EXTRA_BYTES(1024, float)); + uint32_t w83 = XNN_INVALID_VALUE_ID; + std::array w83_dims = {{1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w83_dims.size(), w83_dims.data(), + /*data=*/w83_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w83); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w83" << std::endl; + return nullptr; + } + + static std::vector w84_data; + w84_data.resize(XNN_PAD_EXTRA_BYTES(1025024, float)); + uint32_t w84 = XNN_INVALID_VALUE_ID; + std::array w84_dims = {{1001, 1, 1, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w84_dims.size(), w84_dims.data(), + /*data=*/w84_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w84); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w84" << std::endl; + return nullptr; + } + + static std::vector w85_data; + w85_data.resize(XNN_PAD_EXTRA_BYTES(1001, float)); + uint32_t w85 = XNN_INVALID_VALUE_ID; + std::array w85_dims = {{1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w85_dims.size(), w85_dims.data(), + /*data=*/w85_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w85); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w85" << std::endl; + return nullptr; + } + + auto f32rng = std::bind(std::uniform_real_distribution(-1.0f, +1.0f), + std::ref(rng)); + std::generate(w30_data.begin(), w30_data.end(), std::ref(f32rng)); + std::generate(w31_data.begin(), w31_data.end(), std::ref(f32rng)); + std::generate(w32_data.begin(), w32_data.end(), std::ref(f32rng)); + std::generate(w33_data.begin(), w33_data.end(), std::ref(f32rng)); + std::generate(w34_data.begin(), w34_data.end(), std::ref(f32rng)); + std::generate(w35_data.begin(), w35_data.end(), std::ref(f32rng)); + std::generate(w36_data.begin(), w36_data.end(), std::ref(f32rng)); + std::generate(w37_data.begin(), w37_data.end(), std::ref(f32rng)); + std::generate(w38_data.begin(), w38_data.end(), std::ref(f32rng)); + std::generate(w39_data.begin(), w39_data.end(), std::ref(f32rng)); + std::generate(w40_data.begin(), w40_data.end(), std::ref(f32rng)); + std::generate(w41_data.begin(), w41_data.end(), std::ref(f32rng)); + std::generate(w42_data.begin(), w42_data.end(), std::ref(f32rng)); + std::generate(w43_data.begin(), w43_data.end(), std::ref(f32rng)); + std::generate(w44_data.begin(), w44_data.end(), std::ref(f32rng)); + std::generate(w45_data.begin(), w45_data.end(), std::ref(f32rng)); + std::generate(w46_data.begin(), w46_data.end(), std::ref(f32rng)); + std::generate(w47_data.begin(), w47_data.end(), std::ref(f32rng)); + std::generate(w48_data.begin(), w48_data.end(), std::ref(f32rng)); + std::generate(w49_data.begin(), w49_data.end(), std::ref(f32rng)); + std::generate(w50_data.begin(), w50_data.end(), std::ref(f32rng)); + std::generate(w51_data.begin(), w51_data.end(), std::ref(f32rng)); + std::generate(w52_data.begin(), w52_data.end(), std::ref(f32rng)); + std::generate(w53_data.begin(), w53_data.end(), std::ref(f32rng)); + std::generate(w54_data.begin(), w54_data.end(), std::ref(f32rng)); + std::generate(w55_data.begin(), w55_data.end(), std::ref(f32rng)); + std::generate(w56_data.begin(), w56_data.end(), std::ref(f32rng)); + std::generate(w57_data.begin(), w57_data.end(), std::ref(f32rng)); + std::generate(w58_data.begin(), w58_data.end(), std::ref(f32rng)); + std::generate(w59_data.begin(), w59_data.end(), std::ref(f32rng)); + std::generate(w60_data.begin(), w60_data.end(), std::ref(f32rng)); + std::generate(w61_data.begin(), w61_data.end(), std::ref(f32rng)); + std::generate(w62_data.begin(), w62_data.end(), std::ref(f32rng)); + std::generate(w63_data.begin(), w63_data.end(), std::ref(f32rng)); + std::generate(w64_data.begin(), w64_data.end(), std::ref(f32rng)); + std::generate(w65_data.begin(), w65_data.end(), std::ref(f32rng)); + std::generate(w66_data.begin(), w66_data.end(), std::ref(f32rng)); + std::generate(w67_data.begin(), w67_data.end(), std::ref(f32rng)); + std::generate(w68_data.begin(), w68_data.end(), std::ref(f32rng)); + std::generate(w69_data.begin(), w69_data.end(), std::ref(f32rng)); + std::generate(w70_data.begin(), w70_data.end(), std::ref(f32rng)); + std::generate(w71_data.begin(), w71_data.end(), std::ref(f32rng)); + std::generate(w72_data.begin(), w72_data.end(), std::ref(f32rng)); + std::generate(w73_data.begin(), w73_data.end(), std::ref(f32rng)); + std::generate(w74_data.begin(), w74_data.end(), std::ref(f32rng)); + std::generate(w75_data.begin(), w75_data.end(), std::ref(f32rng)); + std::generate(w76_data.begin(), w76_data.end(), std::ref(f32rng)); + std::generate(w77_data.begin(), w77_data.end(), std::ref(f32rng)); + std::generate(w78_data.begin(), w78_data.end(), std::ref(f32rng)); + std::generate(w79_data.begin(), w79_data.end(), std::ref(f32rng)); + std::generate(w80_data.begin(), w80_data.end(), std::ref(f32rng)); + std::generate(w81_data.begin(), w81_data.end(), std::ref(f32rng)); + std::generate(w82_data.begin(), w82_data.end(), std::ref(f32rng)); + std::generate(w83_data.begin(), w83_data.end(), std::ref(f32rng)); + std::generate(w84_data.begin(), w84_data.end(), std::ref(f32rng)); + std::generate(w85_data.begin(), w85_data.end(), std::ref(f32rng)); + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/3, + /*group_output_channels=*/32, + /*output_min=*/0.0f, /*output_max=*/6.0f, v0, w30, w31, v1, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #0" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/32, + /*output_min=*/0.0f, /*output_max=*/6.0f, v1, w32, w33, v2, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #1" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/64, + /*output_min=*/0.0f, /*output_max=*/6.0f, v2, w34, w35, v3, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #2" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/64, + /*output_min=*/0.0f, /*output_max=*/6.0f, v3, w36, w37, v4, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #3" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/128, + /*output_min=*/0.0f, /*output_max=*/6.0f, v4, w38, w39, v5, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #4" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/128, + /*output_min=*/0.0f, /*output_max=*/6.0f, v5, w40, w41, v6, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #5" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/128, + /*group_output_channels=*/128, + /*output_min=*/0.0f, /*output_max=*/6.0f, v6, w42, w43, v7, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #6" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/128, + /*output_min=*/0.0f, /*output_max=*/6.0f, v7, w44, w45, v8, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #7" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/128, + /*group_output_channels=*/256, + /*output_min=*/0.0f, /*output_max=*/6.0f, v8, w46, w47, v9, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #8" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/256, + /*output_min=*/0.0f, /*output_max=*/6.0f, v9, w48, w49, v10, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #9" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/256, + /*group_output_channels=*/256, + /*output_min=*/0.0f, /*output_max=*/6.0f, v10, w50, w51, v11, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #10" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/256, + /*output_min=*/0.0f, /*output_max=*/6.0f, v11, w52, w53, v12, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #11" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/256, + /*group_output_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v12, w54, w55, v13, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #12" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v13, w56, w57, v14, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #13" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/512, + /*group_output_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v14, w58, w59, v15, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #14" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v15, w60, w61, v16, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #15" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/512, + /*group_output_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v16, w62, w63, v17, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #16" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v17, w64, w65, v18, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #17" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/512, + /*group_output_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v18, w66, w67, v19, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #18" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v19, w68, w69, v20, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #19" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/512, + /*group_output_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v20, w70, w71, v21, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #20" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v21, w72, w73, v22, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #21" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/512, + /*group_output_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v22, w74, w75, v23, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #22" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/512, + /*output_min=*/0.0f, /*output_max=*/6.0f, v23, w76, w77, v24, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #23" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/512, + /*group_output_channels=*/1024, + /*output_min=*/0.0f, /*output_max=*/6.0f, v24, w78, w79, v25, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #24" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/1024, + /*output_min=*/0.0f, /*output_max=*/6.0f, v25, w80, w81, v26, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #25" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/1024, + /*group_output_channels=*/1024, + /*output_min=*/0.0f, /*output_max=*/6.0f, v26, w82, w83, v27, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #26" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/2, /*stride_width=*/2, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v27, v28, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #27" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/1024, + /*group_output_channels=*/1001, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v28, w84, w85, v29, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #28" << std::endl; + return nullptr; + } + + return subgraph; +} // NOLINT(readability/fn_size) + +} // namespace models diff --git a/bench/subgraph/fp16-mobilenet-v2.cc b/bench/subgraph/fp16-mobilenet-v2.cc new file mode 100644 index 00000000000..c6943d53296 --- /dev/null +++ b/bench/subgraph/fp16-mobilenet-v2.cc @@ -0,0 +1,3172 @@ +// Copyright 2020-2025 Google LLC +// +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. +// +// Auto-generated file. Do not edit! + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "include/xnnpack.h" +#include "test/replicable_random_device.h" + +// align a size up to XNN_EXTRA_BYTES +#define XNN_PAD_EXTRA_BYTES(s, t) \ + (((s) + XNN_EXTRA_BYTES / sizeof(t) - 1) & ~(XNN_EXTRA_BYTES / sizeof(t) - 1)) + +namespace models { + +xnn_subgraph_t FP16MobileNetV2() { + xnn_status status; + xnn_subgraph_t subgraph = nullptr; + status = xnn_create_subgraph(/*num_external_values=*/2, 0, &subgraph); + if (status != xnn_status_success) { + std::cerr << "failed to create subgrpah" << std::endl; + return nullptr; + } + + xnnpack::ReplicableRandomDevice rng; + + uint32_t v0 = XNN_INVALID_VALUE_ID; + std::array v0_dims = {{1, 224, 224, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v0_dims.size(), v0_dims.data(), + /*data=*/nullptr, 0, XNN_VALUE_FLAG_EXTERNAL_INPUT, &v0); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v0" << std::endl; + return nullptr; + } + + uint32_t v1 = XNN_INVALID_VALUE_ID; + std::array v1_dims = {{1, 112, 112, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v1_dims.size(), v1_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v1); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v1" << std::endl; + return nullptr; + } + + uint32_t v2 = XNN_INVALID_VALUE_ID; + std::array v2_dims = {{1, 112, 112, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v2_dims.size(), v2_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v2); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v2" << std::endl; + return nullptr; + } + + uint32_t v3 = XNN_INVALID_VALUE_ID; + std::array v3_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v3_dims.size(), v3_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v3); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v3" << std::endl; + return nullptr; + } + + uint32_t v4 = XNN_INVALID_VALUE_ID; + std::array v4_dims = {{1, 112, 112, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v4_dims.size(), v4_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v4); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v4" << std::endl; + return nullptr; + } + + uint32_t v5 = XNN_INVALID_VALUE_ID; + std::array v5_dims = {{1, 56, 56, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v5_dims.size(), v5_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v5); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v5" << std::endl; + return nullptr; + } + + uint32_t v6 = XNN_INVALID_VALUE_ID; + std::array v6_dims = {{1, 56, 56, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v6_dims.size(), v6_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v6); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v6" << std::endl; + return nullptr; + } + + uint32_t v7 = XNN_INVALID_VALUE_ID; + std::array v7_dims = {{1, 56, 56, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v7_dims.size(), v7_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v7); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v7" << std::endl; + return nullptr; + } + + uint32_t v8 = XNN_INVALID_VALUE_ID; + std::array v8_dims = {{1, 56, 56, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v8_dims.size(), v8_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v8); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v8" << std::endl; + return nullptr; + } + + uint32_t v9 = XNN_INVALID_VALUE_ID; + std::array v9_dims = {{1, 56, 56, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v9_dims.size(), v9_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v9); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v9" << std::endl; + return nullptr; + } + + uint32_t v10 = XNN_INVALID_VALUE_ID; + std::array v10_dims = {{1, 56, 56, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v10_dims.size(), v10_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v10); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v10" << std::endl; + return nullptr; + } + + uint32_t v11 = XNN_INVALID_VALUE_ID; + std::array v11_dims = {{1, 56, 56, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v11_dims.size(), v11_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v11); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v11" << std::endl; + return nullptr; + } + + uint32_t v12 = XNN_INVALID_VALUE_ID; + std::array v12_dims = {{1, 28, 28, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v12_dims.size(), v12_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v12); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v12" << std::endl; + return nullptr; + } + + uint32_t v13 = XNN_INVALID_VALUE_ID; + std::array v13_dims = {{1, 28, 28, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v13_dims.size(), v13_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v13); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v13" << std::endl; + return nullptr; + } + + uint32_t v14 = XNN_INVALID_VALUE_ID; + std::array v14_dims = {{1, 28, 28, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v14_dims.size(), v14_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v14); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v14" << std::endl; + return nullptr; + } + + uint32_t v15 = XNN_INVALID_VALUE_ID; + std::array v15_dims = {{1, 28, 28, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v15_dims.size(), v15_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v15); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v15" << std::endl; + return nullptr; + } + + uint32_t v16 = XNN_INVALID_VALUE_ID; + std::array v16_dims = {{1, 28, 28, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v16_dims.size(), v16_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v16); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v16" << std::endl; + return nullptr; + } + + uint32_t v17 = XNN_INVALID_VALUE_ID; + std::array v17_dims = {{1, 28, 28, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v17_dims.size(), v17_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v17); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v17" << std::endl; + return nullptr; + } + + uint32_t v18 = XNN_INVALID_VALUE_ID; + std::array v18_dims = {{1, 28, 28, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v18_dims.size(), v18_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v18); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v18" << std::endl; + return nullptr; + } + + uint32_t v19 = XNN_INVALID_VALUE_ID; + std::array v19_dims = {{1, 28, 28, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v19_dims.size(), v19_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v19); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v19" << std::endl; + return nullptr; + } + + uint32_t v20 = XNN_INVALID_VALUE_ID; + std::array v20_dims = {{1, 28, 28, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v20_dims.size(), v20_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v20); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v20" << std::endl; + return nullptr; + } + + uint32_t v21 = XNN_INVALID_VALUE_ID; + std::array v21_dims = {{1, 28, 28, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v21_dims.size(), v21_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v21); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v21" << std::endl; + return nullptr; + } + + uint32_t v22 = XNN_INVALID_VALUE_ID; + std::array v22_dims = {{1, 28, 28, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v22_dims.size(), v22_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v22); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v22" << std::endl; + return nullptr; + } + + uint32_t v23 = XNN_INVALID_VALUE_ID; + std::array v23_dims = {{1, 14, 14, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v23_dims.size(), v23_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v23); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v23" << std::endl; + return nullptr; + } + + uint32_t v24 = XNN_INVALID_VALUE_ID; + std::array v24_dims = {{1, 14, 14, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v24_dims.size(), v24_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v24); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v24" << std::endl; + return nullptr; + } + + uint32_t v25 = XNN_INVALID_VALUE_ID; + std::array v25_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v25_dims.size(), v25_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v25); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v25" << std::endl; + return nullptr; + } + + uint32_t v26 = XNN_INVALID_VALUE_ID; + std::array v26_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v26_dims.size(), v26_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v26); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v26" << std::endl; + return nullptr; + } + + uint32_t v27 = XNN_INVALID_VALUE_ID; + std::array v27_dims = {{1, 14, 14, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v27_dims.size(), v27_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v27); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v27" << std::endl; + return nullptr; + } + + uint32_t v28 = XNN_INVALID_VALUE_ID; + std::array v28_dims = {{1, 14, 14, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v28_dims.size(), v28_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v28); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v28" << std::endl; + return nullptr; + } + + uint32_t v29 = XNN_INVALID_VALUE_ID; + std::array v29_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v29_dims.size(), v29_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v29); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v29" << std::endl; + return nullptr; + } + + uint32_t v30 = XNN_INVALID_VALUE_ID; + std::array v30_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v30_dims.size(), v30_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v30); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v30" << std::endl; + return nullptr; + } + + uint32_t v31 = XNN_INVALID_VALUE_ID; + std::array v31_dims = {{1, 14, 14, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v31_dims.size(), v31_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v31); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v31" << std::endl; + return nullptr; + } + + uint32_t v32 = XNN_INVALID_VALUE_ID; + std::array v32_dims = {{1, 14, 14, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v32_dims.size(), v32_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v32); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v32" << std::endl; + return nullptr; + } + + uint32_t v33 = XNN_INVALID_VALUE_ID; + std::array v33_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v33_dims.size(), v33_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v33); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v33" << std::endl; + return nullptr; + } + + uint32_t v34 = XNN_INVALID_VALUE_ID; + std::array v34_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v34_dims.size(), v34_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v34); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v34" << std::endl; + return nullptr; + } + + uint32_t v35 = XNN_INVALID_VALUE_ID; + std::array v35_dims = {{1, 14, 14, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v35_dims.size(), v35_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v35); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v35" << std::endl; + return nullptr; + } + + uint32_t v36 = XNN_INVALID_VALUE_ID; + std::array v36_dims = {{1, 14, 14, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v36_dims.size(), v36_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v36); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v36" << std::endl; + return nullptr; + } + + uint32_t v37 = XNN_INVALID_VALUE_ID; + std::array v37_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v37_dims.size(), v37_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v37); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v37" << std::endl; + return nullptr; + } + + uint32_t v38 = XNN_INVALID_VALUE_ID; + std::array v38_dims = {{1, 14, 14, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v38_dims.size(), v38_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v38); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v38" << std::endl; + return nullptr; + } + + uint32_t v39 = XNN_INVALID_VALUE_ID; + std::array v39_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v39_dims.size(), v39_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v39); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v39" << std::endl; + return nullptr; + } + + uint32_t v40 = XNN_INVALID_VALUE_ID; + std::array v40_dims = {{1, 14, 14, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v40_dims.size(), v40_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v40); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v40" << std::endl; + return nullptr; + } + + uint32_t v41 = XNN_INVALID_VALUE_ID; + std::array v41_dims = {{1, 14, 14, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v41_dims.size(), v41_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v41); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v41" << std::endl; + return nullptr; + } + + uint32_t v42 = XNN_INVALID_VALUE_ID; + std::array v42_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v42_dims.size(), v42_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v42); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v42" << std::endl; + return nullptr; + } + + uint32_t v43 = XNN_INVALID_VALUE_ID; + std::array v43_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v43_dims.size(), v43_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v43); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v43" << std::endl; + return nullptr; + } + + uint32_t v44 = XNN_INVALID_VALUE_ID; + std::array v44_dims = {{1, 14, 14, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v44_dims.size(), v44_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v44); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v44" << std::endl; + return nullptr; + } + + uint32_t v45 = XNN_INVALID_VALUE_ID; + std::array v45_dims = {{1, 14, 14, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v45_dims.size(), v45_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v45); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v45" << std::endl; + return nullptr; + } + + uint32_t v46 = XNN_INVALID_VALUE_ID; + std::array v46_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v46_dims.size(), v46_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v46); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v46" << std::endl; + return nullptr; + } + + uint32_t v47 = XNN_INVALID_VALUE_ID; + std::array v47_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v47_dims.size(), v47_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v47); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v47" << std::endl; + return nullptr; + } + + uint32_t v48 = XNN_INVALID_VALUE_ID; + std::array v48_dims = {{1, 14, 14, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v48_dims.size(), v48_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v48); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v48" << std::endl; + return nullptr; + } + + uint32_t v49 = XNN_INVALID_VALUE_ID; + std::array v49_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v49_dims.size(), v49_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v49); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v49" << std::endl; + return nullptr; + } + + uint32_t v50 = XNN_INVALID_VALUE_ID; + std::array v50_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v50_dims.size(), v50_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v50); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v50" << std::endl; + return nullptr; + } + + uint32_t v51 = XNN_INVALID_VALUE_ID; + std::array v51_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v51_dims.size(), v51_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v51); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v51" << std::endl; + return nullptr; + } + + uint32_t v52 = XNN_INVALID_VALUE_ID; + std::array v52_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v52_dims.size(), v52_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v52); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v52" << std::endl; + return nullptr; + } + + uint32_t v53 = XNN_INVALID_VALUE_ID; + std::array v53_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v53_dims.size(), v53_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v53); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v53" << std::endl; + return nullptr; + } + + uint32_t v54 = XNN_INVALID_VALUE_ID; + std::array v54_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v54_dims.size(), v54_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v54); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v54" << std::endl; + return nullptr; + } + + uint32_t v55 = XNN_INVALID_VALUE_ID; + std::array v55_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v55_dims.size(), v55_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v55); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v55" << std::endl; + return nullptr; + } + + uint32_t v56 = XNN_INVALID_VALUE_ID; + std::array v56_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v56_dims.size(), v56_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v56); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v56" << std::endl; + return nullptr; + } + + uint32_t v57 = XNN_INVALID_VALUE_ID; + std::array v57_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v57_dims.size(), v57_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v57); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v57" << std::endl; + return nullptr; + } + + uint32_t v58 = XNN_INVALID_VALUE_ID; + std::array v58_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v58_dims.size(), v58_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v58); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v58" << std::endl; + return nullptr; + } + + uint32_t v59 = XNN_INVALID_VALUE_ID; + std::array v59_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v59_dims.size(), v59_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v59); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v59" << std::endl; + return nullptr; + } + + uint32_t v60 = XNN_INVALID_VALUE_ID; + std::array v60_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v60_dims.size(), v60_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v60); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v60" << std::endl; + return nullptr; + } + + uint32_t v61 = XNN_INVALID_VALUE_ID; + std::array v61_dims = {{1, 7, 7, 320}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v61_dims.size(), v61_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v61); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v61" << std::endl; + return nullptr; + } + + uint32_t v62 = XNN_INVALID_VALUE_ID; + std::array v62_dims = {{1, 7, 7, 1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v62_dims.size(), v62_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v62); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v62" << std::endl; + return nullptr; + } + + uint32_t v63 = XNN_INVALID_VALUE_ID; + std::array v63_dims = {{1, 1, 1, 1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v63_dims.size(), v63_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v63); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v63" << std::endl; + return nullptr; + } + + uint32_t v64 = XNN_INVALID_VALUE_ID; + std::array v64_dims = {{1, 1, 1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v64_dims.size(), v64_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v64); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v64" << std::endl; + return nullptr; + } + + uint32_t v65 = XNN_INVALID_VALUE_ID; + std::array v65_dims = {{1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v65_dims.size(), v65_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v65); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v65" << std::endl; + return nullptr; + } + + uint32_t v66 = XNN_INVALID_VALUE_ID; + std::array v66_dims = {{1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v66_dims.size(), v66_dims.data(), + /*data=*/nullptr, 1, XNN_VALUE_FLAG_EXTERNAL_OUTPUT, &v66); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v66" << std::endl; + return nullptr; + } + + static std::vector w67_data; + w67_data.resize(XNN_PAD_EXTRA_BYTES(864, float)); + uint32_t w67 = XNN_INVALID_VALUE_ID; + std::array w67_dims = {{32, 3, 3, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w67_dims.size(), w67_dims.data(), + /*data=*/w67_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w67); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w67" << std::endl; + return nullptr; + } + + static std::vector w68_data; + w68_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w68 = XNN_INVALID_VALUE_ID; + std::array w68_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w68_dims.size(), w68_dims.data(), + /*data=*/w68_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w68); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w68" << std::endl; + return nullptr; + } + + static std::vector w69_data; + w69_data.resize(XNN_PAD_EXTRA_BYTES(288, float)); + uint32_t w69 = XNN_INVALID_VALUE_ID; + std::array w69_dims = {{1, 3, 3, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w69_dims.size(), w69_dims.data(), + /*data=*/w69_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w69); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w69" << std::endl; + return nullptr; + } + + static std::vector w70_data; + w70_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w70 = XNN_INVALID_VALUE_ID; + std::array w70_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w70_dims.size(), w70_dims.data(), + /*data=*/w70_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w70); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w70" << std::endl; + return nullptr; + } + + static std::vector w71_data; + w71_data.resize(XNN_PAD_EXTRA_BYTES(512, float)); + uint32_t w71 = XNN_INVALID_VALUE_ID; + std::array w71_dims = {{16, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w71_dims.size(), w71_dims.data(), + /*data=*/w71_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w71); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w71" << std::endl; + return nullptr; + } + + static std::vector w72_data; + w72_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w72 = XNN_INVALID_VALUE_ID; + std::array w72_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w72_dims.size(), w72_dims.data(), + /*data=*/w72_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w72); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w72" << std::endl; + return nullptr; + } + + static std::vector w73_data; + w73_data.resize(XNN_PAD_EXTRA_BYTES(1536, float)); + uint32_t w73 = XNN_INVALID_VALUE_ID; + std::array w73_dims = {{96, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w73_dims.size(), w73_dims.data(), + /*data=*/w73_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w73); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w73" << std::endl; + return nullptr; + } + + static std::vector w74_data; + w74_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w74 = XNN_INVALID_VALUE_ID; + std::array w74_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w74_dims.size(), w74_dims.data(), + /*data=*/w74_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w74); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w74" << std::endl; + return nullptr; + } + + static std::vector w75_data; + w75_data.resize(XNN_PAD_EXTRA_BYTES(864, float)); + uint32_t w75 = XNN_INVALID_VALUE_ID; + std::array w75_dims = {{1, 3, 3, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w75_dims.size(), w75_dims.data(), + /*data=*/w75_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w75); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w75" << std::endl; + return nullptr; + } + + static std::vector w76_data; + w76_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w76 = XNN_INVALID_VALUE_ID; + std::array w76_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w76_dims.size(), w76_dims.data(), + /*data=*/w76_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w76); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w76" << std::endl; + return nullptr; + } + + static std::vector w77_data; + w77_data.resize(XNN_PAD_EXTRA_BYTES(2304, float)); + uint32_t w77 = XNN_INVALID_VALUE_ID; + std::array w77_dims = {{24, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w77_dims.size(), w77_dims.data(), + /*data=*/w77_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w77); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w77" << std::endl; + return nullptr; + } + + static std::vector w78_data; + w78_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w78 = XNN_INVALID_VALUE_ID; + std::array w78_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w78_dims.size(), w78_dims.data(), + /*data=*/w78_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w78); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w78" << std::endl; + return nullptr; + } + + static std::vector w79_data; + w79_data.resize(XNN_PAD_EXTRA_BYTES(3456, float)); + uint32_t w79 = XNN_INVALID_VALUE_ID; + std::array w79_dims = {{144, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w79_dims.size(), w79_dims.data(), + /*data=*/w79_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w79); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w79" << std::endl; + return nullptr; + } + + static std::vector w80_data; + w80_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w80 = XNN_INVALID_VALUE_ID; + std::array w80_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w80_dims.size(), w80_dims.data(), + /*data=*/w80_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w80); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w80" << std::endl; + return nullptr; + } + + static std::vector w81_data; + w81_data.resize(XNN_PAD_EXTRA_BYTES(1296, float)); + uint32_t w81 = XNN_INVALID_VALUE_ID; + std::array w81_dims = {{1, 3, 3, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w81_dims.size(), w81_dims.data(), + /*data=*/w81_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w81); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w81" << std::endl; + return nullptr; + } + + static std::vector w82_data; + w82_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w82 = XNN_INVALID_VALUE_ID; + std::array w82_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w82_dims.size(), w82_dims.data(), + /*data=*/w82_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w82); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w82" << std::endl; + return nullptr; + } + + static std::vector w83_data; + w83_data.resize(XNN_PAD_EXTRA_BYTES(3456, float)); + uint32_t w83 = XNN_INVALID_VALUE_ID; + std::array w83_dims = {{24, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w83_dims.size(), w83_dims.data(), + /*data=*/w83_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w83); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w83" << std::endl; + return nullptr; + } + + static std::vector w84_data; + w84_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w84 = XNN_INVALID_VALUE_ID; + std::array w84_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w84_dims.size(), w84_dims.data(), + /*data=*/w84_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w84); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w84" << std::endl; + return nullptr; + } + + static std::vector w85_data; + w85_data.resize(XNN_PAD_EXTRA_BYTES(3456, float)); + uint32_t w85 = XNN_INVALID_VALUE_ID; + std::array w85_dims = {{144, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w85_dims.size(), w85_dims.data(), + /*data=*/w85_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w85); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w85" << std::endl; + return nullptr; + } + + static std::vector w86_data; + w86_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w86 = XNN_INVALID_VALUE_ID; + std::array w86_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w86_dims.size(), w86_dims.data(), + /*data=*/w86_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w86); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w86" << std::endl; + return nullptr; + } + + static std::vector w87_data; + w87_data.resize(XNN_PAD_EXTRA_BYTES(1296, float)); + uint32_t w87 = XNN_INVALID_VALUE_ID; + std::array w87_dims = {{1, 3, 3, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w87_dims.size(), w87_dims.data(), + /*data=*/w87_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w87); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w87" << std::endl; + return nullptr; + } + + static std::vector w88_data; + w88_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w88 = XNN_INVALID_VALUE_ID; + std::array w88_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w88_dims.size(), w88_dims.data(), + /*data=*/w88_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w88); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w88" << std::endl; + return nullptr; + } + + static std::vector w89_data; + w89_data.resize(XNN_PAD_EXTRA_BYTES(4608, float)); + uint32_t w89 = XNN_INVALID_VALUE_ID; + std::array w89_dims = {{32, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w89_dims.size(), w89_dims.data(), + /*data=*/w89_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w89); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w89" << std::endl; + return nullptr; + } + + static std::vector w90_data; + w90_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w90 = XNN_INVALID_VALUE_ID; + std::array w90_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w90_dims.size(), w90_dims.data(), + /*data=*/w90_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w90); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w90" << std::endl; + return nullptr; + } + + static std::vector w91_data; + w91_data.resize(XNN_PAD_EXTRA_BYTES(6144, float)); + uint32_t w91 = XNN_INVALID_VALUE_ID; + std::array w91_dims = {{192, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w91_dims.size(), w91_dims.data(), + /*data=*/w91_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w91); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w91" << std::endl; + return nullptr; + } + + static std::vector w92_data; + w92_data.resize(XNN_PAD_EXTRA_BYTES(192, float)); + uint32_t w92 = XNN_INVALID_VALUE_ID; + std::array w92_dims = {{192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w92_dims.size(), w92_dims.data(), + /*data=*/w92_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w92); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w92" << std::endl; + return nullptr; + } + + static std::vector w93_data; + w93_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w93 = XNN_INVALID_VALUE_ID; + std::array w93_dims = {{1, 3, 3, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w93_dims.size(), w93_dims.data(), + /*data=*/w93_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w93); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w93" << std::endl; + return nullptr; + } + + static std::vector w94_data; + w94_data.resize(XNN_PAD_EXTRA_BYTES(192, float)); + uint32_t w94 = XNN_INVALID_VALUE_ID; + std::array w94_dims = {{192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w94_dims.size(), w94_dims.data(), + /*data=*/w94_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w94); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w94" << std::endl; + return nullptr; + } + + static std::vector w95_data; + w95_data.resize(XNN_PAD_EXTRA_BYTES(6144, float)); + uint32_t w95 = XNN_INVALID_VALUE_ID; + std::array w95_dims = {{32, 1, 1, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w95_dims.size(), w95_dims.data(), + /*data=*/w95_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w95); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w95" << std::endl; + return nullptr; + } + + static std::vector w96_data; + w96_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w96 = XNN_INVALID_VALUE_ID; + std::array w96_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w96_dims.size(), w96_dims.data(), + /*data=*/w96_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w96); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w96" << std::endl; + return nullptr; + } + + static std::vector w97_data; + w97_data.resize(XNN_PAD_EXTRA_BYTES(6144, float)); + uint32_t w97 = XNN_INVALID_VALUE_ID; + std::array w97_dims = {{192, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w97_dims.size(), w97_dims.data(), + /*data=*/w97_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w97); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w97" << std::endl; + return nullptr; + } + + static std::vector w98_data; + w98_data.resize(XNN_PAD_EXTRA_BYTES(192, float)); + uint32_t w98 = XNN_INVALID_VALUE_ID; + std::array w98_dims = {{192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w98_dims.size(), w98_dims.data(), + /*data=*/w98_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w98); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w98" << std::endl; + return nullptr; + } + + static std::vector w99_data; + w99_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w99 = XNN_INVALID_VALUE_ID; + std::array w99_dims = {{1, 3, 3, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w99_dims.size(), w99_dims.data(), + /*data=*/w99_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w99); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w99" << std::endl; + return nullptr; + } + + static std::vector w100_data; + w100_data.resize(XNN_PAD_EXTRA_BYTES(192, float)); + uint32_t w100 = XNN_INVALID_VALUE_ID; + std::array w100_dims = {{192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w100_dims.size(), w100_dims.data(), + /*data=*/w100_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w100); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w100" << std::endl; + return nullptr; + } + + static std::vector w101_data; + w101_data.resize(XNN_PAD_EXTRA_BYTES(6144, float)); + uint32_t w101 = XNN_INVALID_VALUE_ID; + std::array w101_dims = {{32, 1, 1, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w101_dims.size(), w101_dims.data(), + /*data=*/w101_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w101); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w101" << std::endl; + return nullptr; + } + + static std::vector w102_data; + w102_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w102 = XNN_INVALID_VALUE_ID; + std::array w102_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w102_dims.size(), w102_dims.data(), + /*data=*/w102_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w102); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w102" << std::endl; + return nullptr; + } + + static std::vector w103_data; + w103_data.resize(XNN_PAD_EXTRA_BYTES(6144, float)); + uint32_t w103 = XNN_INVALID_VALUE_ID; + std::array w103_dims = {{192, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w103_dims.size(), w103_dims.data(), + /*data=*/w103_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w103); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w103" << std::endl; + return nullptr; + } + + static std::vector w104_data; + w104_data.resize(XNN_PAD_EXTRA_BYTES(192, float)); + uint32_t w104 = XNN_INVALID_VALUE_ID; + std::array w104_dims = {{192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w104_dims.size(), w104_dims.data(), + /*data=*/w104_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w104); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w104" << std::endl; + return nullptr; + } + + static std::vector w105_data; + w105_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w105 = XNN_INVALID_VALUE_ID; + std::array w105_dims = {{1, 3, 3, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w105_dims.size(), w105_dims.data(), + /*data=*/w105_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w105); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w105" << std::endl; + return nullptr; + } + + static std::vector w106_data; + w106_data.resize(XNN_PAD_EXTRA_BYTES(192, float)); + uint32_t w106 = XNN_INVALID_VALUE_ID; + std::array w106_dims = {{192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w106_dims.size(), w106_dims.data(), + /*data=*/w106_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w106); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w106" << std::endl; + return nullptr; + } + + static std::vector w107_data; + w107_data.resize(XNN_PAD_EXTRA_BYTES(12288, float)); + uint32_t w107 = XNN_INVALID_VALUE_ID; + std::array w107_dims = {{64, 1, 1, 192}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w107_dims.size(), w107_dims.data(), + /*data=*/w107_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w107); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w107" << std::endl; + return nullptr; + } + + static std::vector w108_data; + w108_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w108 = XNN_INVALID_VALUE_ID; + std::array w108_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w108_dims.size(), w108_dims.data(), + /*data=*/w108_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w108); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w108" << std::endl; + return nullptr; + } + + static std::vector w109_data; + w109_data.resize(XNN_PAD_EXTRA_BYTES(24576, float)); + uint32_t w109 = XNN_INVALID_VALUE_ID; + std::array w109_dims = {{384, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w109_dims.size(), w109_dims.data(), + /*data=*/w109_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w109); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w109" << std::endl; + return nullptr; + } + + static std::vector w110_data; + w110_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w110 = XNN_INVALID_VALUE_ID; + std::array w110_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w110_dims.size(), w110_dims.data(), + /*data=*/w110_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w110); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w110" << std::endl; + return nullptr; + } + + static std::vector w111_data; + w111_data.resize(XNN_PAD_EXTRA_BYTES(3456, float)); + uint32_t w111 = XNN_INVALID_VALUE_ID; + std::array w111_dims = {{1, 3, 3, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w111_dims.size(), w111_dims.data(), + /*data=*/w111_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w111); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w111" << std::endl; + return nullptr; + } + + static std::vector w112_data; + w112_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w112 = XNN_INVALID_VALUE_ID; + std::array w112_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w112_dims.size(), w112_dims.data(), + /*data=*/w112_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w112); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w112" << std::endl; + return nullptr; + } + + static std::vector w113_data; + w113_data.resize(XNN_PAD_EXTRA_BYTES(24576, float)); + uint32_t w113 = XNN_INVALID_VALUE_ID; + std::array w113_dims = {{64, 1, 1, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w113_dims.size(), w113_dims.data(), + /*data=*/w113_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w113); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w113" << std::endl; + return nullptr; + } + + static std::vector w114_data; + w114_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w114 = XNN_INVALID_VALUE_ID; + std::array w114_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w114_dims.size(), w114_dims.data(), + /*data=*/w114_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w114); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w114" << std::endl; + return nullptr; + } + + static std::vector w115_data; + w115_data.resize(XNN_PAD_EXTRA_BYTES(24576, float)); + uint32_t w115 = XNN_INVALID_VALUE_ID; + std::array w115_dims = {{384, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w115_dims.size(), w115_dims.data(), + /*data=*/w115_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w115); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w115" << std::endl; + return nullptr; + } + + static std::vector w116_data; + w116_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w116 = XNN_INVALID_VALUE_ID; + std::array w116_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w116_dims.size(), w116_dims.data(), + /*data=*/w116_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w116); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w116" << std::endl; + return nullptr; + } + + static std::vector w117_data; + w117_data.resize(XNN_PAD_EXTRA_BYTES(3456, float)); + uint32_t w117 = XNN_INVALID_VALUE_ID; + std::array w117_dims = {{1, 3, 3, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w117_dims.size(), w117_dims.data(), + /*data=*/w117_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w117); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w117" << std::endl; + return nullptr; + } + + static std::vector w118_data; + w118_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w118 = XNN_INVALID_VALUE_ID; + std::array w118_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w118_dims.size(), w118_dims.data(), + /*data=*/w118_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w118); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w118" << std::endl; + return nullptr; + } + + static std::vector w119_data; + w119_data.resize(XNN_PAD_EXTRA_BYTES(24576, float)); + uint32_t w119 = XNN_INVALID_VALUE_ID; + std::array w119_dims = {{64, 1, 1, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w119_dims.size(), w119_dims.data(), + /*data=*/w119_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w119); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w119" << std::endl; + return nullptr; + } + + static std::vector w120_data; + w120_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w120 = XNN_INVALID_VALUE_ID; + std::array w120_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w120_dims.size(), w120_dims.data(), + /*data=*/w120_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w120); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w120" << std::endl; + return nullptr; + } + + static std::vector w121_data; + w121_data.resize(XNN_PAD_EXTRA_BYTES(24576, float)); + uint32_t w121 = XNN_INVALID_VALUE_ID; + std::array w121_dims = {{384, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w121_dims.size(), w121_dims.data(), + /*data=*/w121_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w121); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w121" << std::endl; + return nullptr; + } + + static std::vector w122_data; + w122_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w122 = XNN_INVALID_VALUE_ID; + std::array w122_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w122_dims.size(), w122_dims.data(), + /*data=*/w122_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w122); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w122" << std::endl; + return nullptr; + } + + static std::vector w123_data; + w123_data.resize(XNN_PAD_EXTRA_BYTES(3456, float)); + uint32_t w123 = XNN_INVALID_VALUE_ID; + std::array w123_dims = {{1, 3, 3, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w123_dims.size(), w123_dims.data(), + /*data=*/w123_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w123); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w123" << std::endl; + return nullptr; + } + + static std::vector w124_data; + w124_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w124 = XNN_INVALID_VALUE_ID; + std::array w124_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w124_dims.size(), w124_dims.data(), + /*data=*/w124_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w124); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w124" << std::endl; + return nullptr; + } + + static std::vector w125_data; + w125_data.resize(XNN_PAD_EXTRA_BYTES(24576, float)); + uint32_t w125 = XNN_INVALID_VALUE_ID; + std::array w125_dims = {{64, 1, 1, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w125_dims.size(), w125_dims.data(), + /*data=*/w125_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w125); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w125" << std::endl; + return nullptr; + } + + static std::vector w126_data; + w126_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w126 = XNN_INVALID_VALUE_ID; + std::array w126_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w126_dims.size(), w126_dims.data(), + /*data=*/w126_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w126); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w126" << std::endl; + return nullptr; + } + + static std::vector w127_data; + w127_data.resize(XNN_PAD_EXTRA_BYTES(24576, float)); + uint32_t w127 = XNN_INVALID_VALUE_ID; + std::array w127_dims = {{384, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w127_dims.size(), w127_dims.data(), + /*data=*/w127_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w127); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w127" << std::endl; + return nullptr; + } + + static std::vector w128_data; + w128_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w128 = XNN_INVALID_VALUE_ID; + std::array w128_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w128_dims.size(), w128_dims.data(), + /*data=*/w128_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w128); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w128" << std::endl; + return nullptr; + } + + static std::vector w129_data; + w129_data.resize(XNN_PAD_EXTRA_BYTES(3456, float)); + uint32_t w129 = XNN_INVALID_VALUE_ID; + std::array w129_dims = {{1, 3, 3, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w129_dims.size(), w129_dims.data(), + /*data=*/w129_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w129); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w129" << std::endl; + return nullptr; + } + + static std::vector w130_data; + w130_data.resize(XNN_PAD_EXTRA_BYTES(384, float)); + uint32_t w130 = XNN_INVALID_VALUE_ID; + std::array w130_dims = {{384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w130_dims.size(), w130_dims.data(), + /*data=*/w130_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w130); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w130" << std::endl; + return nullptr; + } + + static std::vector w131_data; + w131_data.resize(XNN_PAD_EXTRA_BYTES(36864, float)); + uint32_t w131 = XNN_INVALID_VALUE_ID; + std::array w131_dims = {{96, 1, 1, 384}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w131_dims.size(), w131_dims.data(), + /*data=*/w131_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w131); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w131" << std::endl; + return nullptr; + } + + static std::vector w132_data; + w132_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w132 = XNN_INVALID_VALUE_ID; + std::array w132_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w132_dims.size(), w132_dims.data(), + /*data=*/w132_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w132); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w132" << std::endl; + return nullptr; + } + + static std::vector w133_data; + w133_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w133 = XNN_INVALID_VALUE_ID; + std::array w133_dims = {{576, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w133_dims.size(), w133_dims.data(), + /*data=*/w133_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w133); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w133" << std::endl; + return nullptr; + } + + static std::vector w134_data; + w134_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w134 = XNN_INVALID_VALUE_ID; + std::array w134_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w134_dims.size(), w134_dims.data(), + /*data=*/w134_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w134); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w134" << std::endl; + return nullptr; + } + + static std::vector w135_data; + w135_data.resize(XNN_PAD_EXTRA_BYTES(5184, float)); + uint32_t w135 = XNN_INVALID_VALUE_ID; + std::array w135_dims = {{1, 3, 3, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w135_dims.size(), w135_dims.data(), + /*data=*/w135_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w135); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w135" << std::endl; + return nullptr; + } + + static std::vector w136_data; + w136_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w136 = XNN_INVALID_VALUE_ID; + std::array w136_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w136_dims.size(), w136_dims.data(), + /*data=*/w136_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w136); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w136" << std::endl; + return nullptr; + } + + static std::vector w137_data; + w137_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w137 = XNN_INVALID_VALUE_ID; + std::array w137_dims = {{96, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w137_dims.size(), w137_dims.data(), + /*data=*/w137_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w137); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w137" << std::endl; + return nullptr; + } + + static std::vector w138_data; + w138_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w138 = XNN_INVALID_VALUE_ID; + std::array w138_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w138_dims.size(), w138_dims.data(), + /*data=*/w138_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w138); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w138" << std::endl; + return nullptr; + } + + static std::vector w139_data; + w139_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w139 = XNN_INVALID_VALUE_ID; + std::array w139_dims = {{576, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w139_dims.size(), w139_dims.data(), + /*data=*/w139_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w139); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w139" << std::endl; + return nullptr; + } + + static std::vector w140_data; + w140_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w140 = XNN_INVALID_VALUE_ID; + std::array w140_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w140_dims.size(), w140_dims.data(), + /*data=*/w140_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w140); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w140" << std::endl; + return nullptr; + } + + static std::vector w141_data; + w141_data.resize(XNN_PAD_EXTRA_BYTES(5184, float)); + uint32_t w141 = XNN_INVALID_VALUE_ID; + std::array w141_dims = {{1, 3, 3, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w141_dims.size(), w141_dims.data(), + /*data=*/w141_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w141); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w141" << std::endl; + return nullptr; + } + + static std::vector w142_data; + w142_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w142 = XNN_INVALID_VALUE_ID; + std::array w142_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w142_dims.size(), w142_dims.data(), + /*data=*/w142_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w142); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w142" << std::endl; + return nullptr; + } + + static std::vector w143_data; + w143_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w143 = XNN_INVALID_VALUE_ID; + std::array w143_dims = {{96, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w143_dims.size(), w143_dims.data(), + /*data=*/w143_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w143); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w143" << std::endl; + return nullptr; + } + + static std::vector w144_data; + w144_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w144 = XNN_INVALID_VALUE_ID; + std::array w144_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w144_dims.size(), w144_dims.data(), + /*data=*/w144_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w144); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w144" << std::endl; + return nullptr; + } + + static std::vector w145_data; + w145_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w145 = XNN_INVALID_VALUE_ID; + std::array w145_dims = {{576, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w145_dims.size(), w145_dims.data(), + /*data=*/w145_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w145); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w145" << std::endl; + return nullptr; + } + + static std::vector w146_data; + w146_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w146 = XNN_INVALID_VALUE_ID; + std::array w146_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w146_dims.size(), w146_dims.data(), + /*data=*/w146_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w146); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w146" << std::endl; + return nullptr; + } + + static std::vector w147_data; + w147_data.resize(XNN_PAD_EXTRA_BYTES(5184, float)); + uint32_t w147 = XNN_INVALID_VALUE_ID; + std::array w147_dims = {{1, 3, 3, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w147_dims.size(), w147_dims.data(), + /*data=*/w147_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w147); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w147" << std::endl; + return nullptr; + } + + static std::vector w148_data; + w148_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w148 = XNN_INVALID_VALUE_ID; + std::array w148_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w148_dims.size(), w148_dims.data(), + /*data=*/w148_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w148); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w148" << std::endl; + return nullptr; + } + + static std::vector w149_data; + w149_data.resize(XNN_PAD_EXTRA_BYTES(92160, float)); + uint32_t w149 = XNN_INVALID_VALUE_ID; + std::array w149_dims = {{160, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w149_dims.size(), w149_dims.data(), + /*data=*/w149_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w149); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w149" << std::endl; + return nullptr; + } + + static std::vector w150_data; + w150_data.resize(XNN_PAD_EXTRA_BYTES(160, float)); + uint32_t w150 = XNN_INVALID_VALUE_ID; + std::array w150_dims = {{160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w150_dims.size(), w150_dims.data(), + /*data=*/w150_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w150); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w150" << std::endl; + return nullptr; + } + + static std::vector w151_data; + w151_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w151 = XNN_INVALID_VALUE_ID; + std::array w151_dims = {{960, 1, 1, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w151_dims.size(), w151_dims.data(), + /*data=*/w151_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w151); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w151" << std::endl; + return nullptr; + } + + static std::vector w152_data; + w152_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w152 = XNN_INVALID_VALUE_ID; + std::array w152_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w152_dims.size(), w152_dims.data(), + /*data=*/w152_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w152); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w152" << std::endl; + return nullptr; + } + + static std::vector w153_data; + w153_data.resize(XNN_PAD_EXTRA_BYTES(8640, float)); + uint32_t w153 = XNN_INVALID_VALUE_ID; + std::array w153_dims = {{1, 3, 3, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w153_dims.size(), w153_dims.data(), + /*data=*/w153_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w153); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w153" << std::endl; + return nullptr; + } + + static std::vector w154_data; + w154_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w154 = XNN_INVALID_VALUE_ID; + std::array w154_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w154_dims.size(), w154_dims.data(), + /*data=*/w154_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w154); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w154" << std::endl; + return nullptr; + } + + static std::vector w155_data; + w155_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w155 = XNN_INVALID_VALUE_ID; + std::array w155_dims = {{160, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w155_dims.size(), w155_dims.data(), + /*data=*/w155_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w155); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w155" << std::endl; + return nullptr; + } + + static std::vector w156_data; + w156_data.resize(XNN_PAD_EXTRA_BYTES(160, float)); + uint32_t w156 = XNN_INVALID_VALUE_ID; + std::array w156_dims = {{160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w156_dims.size(), w156_dims.data(), + /*data=*/w156_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w156); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w156" << std::endl; + return nullptr; + } + + static std::vector w157_data; + w157_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w157 = XNN_INVALID_VALUE_ID; + std::array w157_dims = {{960, 1, 1, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w157_dims.size(), w157_dims.data(), + /*data=*/w157_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w157); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w157" << std::endl; + return nullptr; + } + + static std::vector w158_data; + w158_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w158 = XNN_INVALID_VALUE_ID; + std::array w158_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w158_dims.size(), w158_dims.data(), + /*data=*/w158_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w158); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w158" << std::endl; + return nullptr; + } + + static std::vector w159_data; + w159_data.resize(XNN_PAD_EXTRA_BYTES(8640, float)); + uint32_t w159 = XNN_INVALID_VALUE_ID; + std::array w159_dims = {{1, 3, 3, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w159_dims.size(), w159_dims.data(), + /*data=*/w159_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w159); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w159" << std::endl; + return nullptr; + } + + static std::vector w160_data; + w160_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w160 = XNN_INVALID_VALUE_ID; + std::array w160_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w160_dims.size(), w160_dims.data(), + /*data=*/w160_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w160); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w160" << std::endl; + return nullptr; + } + + static std::vector w161_data; + w161_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w161 = XNN_INVALID_VALUE_ID; + std::array w161_dims = {{160, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w161_dims.size(), w161_dims.data(), + /*data=*/w161_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w161); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w161" << std::endl; + return nullptr; + } + + static std::vector w162_data; + w162_data.resize(XNN_PAD_EXTRA_BYTES(160, float)); + uint32_t w162 = XNN_INVALID_VALUE_ID; + std::array w162_dims = {{160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w162_dims.size(), w162_dims.data(), + /*data=*/w162_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w162); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w162" << std::endl; + return nullptr; + } + + static std::vector w163_data; + w163_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w163 = XNN_INVALID_VALUE_ID; + std::array w163_dims = {{960, 1, 1, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w163_dims.size(), w163_dims.data(), + /*data=*/w163_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w163); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w163" << std::endl; + return nullptr; + } + + static std::vector w164_data; + w164_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w164 = XNN_INVALID_VALUE_ID; + std::array w164_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w164_dims.size(), w164_dims.data(), + /*data=*/w164_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w164); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w164" << std::endl; + return nullptr; + } + + static std::vector w165_data; + w165_data.resize(XNN_PAD_EXTRA_BYTES(8640, float)); + uint32_t w165 = XNN_INVALID_VALUE_ID; + std::array w165_dims = {{1, 3, 3, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w165_dims.size(), w165_dims.data(), + /*data=*/w165_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w165); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w165" << std::endl; + return nullptr; + } + + static std::vector w166_data; + w166_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w166 = XNN_INVALID_VALUE_ID; + std::array w166_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w166_dims.size(), w166_dims.data(), + /*data=*/w166_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w166); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w166" << std::endl; + return nullptr; + } + + static std::vector w167_data; + w167_data.resize(XNN_PAD_EXTRA_BYTES(307200, float)); + uint32_t w167 = XNN_INVALID_VALUE_ID; + std::array w167_dims = {{320, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w167_dims.size(), w167_dims.data(), + /*data=*/w167_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w167); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w167" << std::endl; + return nullptr; + } + + static std::vector w168_data; + w168_data.resize(XNN_PAD_EXTRA_BYTES(320, float)); + uint32_t w168 = XNN_INVALID_VALUE_ID; + std::array w168_dims = {{320}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w168_dims.size(), w168_dims.data(), + /*data=*/w168_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w168); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w168" << std::endl; + return nullptr; + } + + static std::vector w169_data; + w169_data.resize(XNN_PAD_EXTRA_BYTES(409600, float)); + uint32_t w169 = XNN_INVALID_VALUE_ID; + std::array w169_dims = {{1280, 1, 1, 320}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w169_dims.size(), w169_dims.data(), + /*data=*/w169_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w169); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w169" << std::endl; + return nullptr; + } + + static std::vector w170_data; + w170_data.resize(XNN_PAD_EXTRA_BYTES(1280, float)); + uint32_t w170 = XNN_INVALID_VALUE_ID; + std::array w170_dims = {{1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w170_dims.size(), w170_dims.data(), + /*data=*/w170_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w170); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w170" << std::endl; + return nullptr; + } + + static std::vector w171_data; + w171_data.resize(XNN_PAD_EXTRA_BYTES(1281280, float)); + uint32_t w171 = XNN_INVALID_VALUE_ID; + std::array w171_dims = {{1001, 1, 1, 1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w171_dims.size(), w171_dims.data(), + /*data=*/w171_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w171); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w171" << std::endl; + return nullptr; + } + + static std::vector w172_data; + w172_data.resize(XNN_PAD_EXTRA_BYTES(1001, float)); + uint32_t w172 = XNN_INVALID_VALUE_ID; + std::array w172_dims = {{1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w172_dims.size(), w172_dims.data(), + /*data=*/w172_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w172); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w172" << std::endl; + return nullptr; + } + + static std::vector w173_data; + w173_data.resize(XNN_PAD_EXTRA_BYTES(2, int32_t)); + uint32_t w173 = XNN_INVALID_VALUE_ID; + std::array w173_dims = {{2}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_int32, w173_dims.size(), w173_dims.data(), + /*data=*/w173_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w173); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w173" << std::endl; + return nullptr; + } + + auto f32rng = std::bind(std::uniform_real_distribution(-1.0f, +1.0f), + std::ref(rng)); + auto i32rng = std::bind(std::uniform_int_distribution(-10000, 10000), + std::ref(rng)); + std::generate(w67_data.begin(), w67_data.end(), std::ref(f32rng)); + std::generate(w68_data.begin(), w68_data.end(), std::ref(f32rng)); + std::generate(w69_data.begin(), w69_data.end(), std::ref(f32rng)); + std::generate(w70_data.begin(), w70_data.end(), std::ref(f32rng)); + std::generate(w71_data.begin(), w71_data.end(), std::ref(f32rng)); + std::generate(w72_data.begin(), w72_data.end(), std::ref(f32rng)); + std::generate(w73_data.begin(), w73_data.end(), std::ref(f32rng)); + std::generate(w74_data.begin(), w74_data.end(), std::ref(f32rng)); + std::generate(w75_data.begin(), w75_data.end(), std::ref(f32rng)); + std::generate(w76_data.begin(), w76_data.end(), std::ref(f32rng)); + std::generate(w77_data.begin(), w77_data.end(), std::ref(f32rng)); + std::generate(w78_data.begin(), w78_data.end(), std::ref(f32rng)); + std::generate(w79_data.begin(), w79_data.end(), std::ref(f32rng)); + std::generate(w80_data.begin(), w80_data.end(), std::ref(f32rng)); + std::generate(w81_data.begin(), w81_data.end(), std::ref(f32rng)); + std::generate(w82_data.begin(), w82_data.end(), std::ref(f32rng)); + std::generate(w83_data.begin(), w83_data.end(), std::ref(f32rng)); + std::generate(w84_data.begin(), w84_data.end(), std::ref(f32rng)); + std::generate(w85_data.begin(), w85_data.end(), std::ref(f32rng)); + std::generate(w86_data.begin(), w86_data.end(), std::ref(f32rng)); + std::generate(w87_data.begin(), w87_data.end(), std::ref(f32rng)); + std::generate(w88_data.begin(), w88_data.end(), std::ref(f32rng)); + std::generate(w89_data.begin(), w89_data.end(), std::ref(f32rng)); + std::generate(w90_data.begin(), w90_data.end(), std::ref(f32rng)); + std::generate(w91_data.begin(), w91_data.end(), std::ref(f32rng)); + std::generate(w92_data.begin(), w92_data.end(), std::ref(f32rng)); + std::generate(w93_data.begin(), w93_data.end(), std::ref(f32rng)); + std::generate(w94_data.begin(), w94_data.end(), std::ref(f32rng)); + std::generate(w95_data.begin(), w95_data.end(), std::ref(f32rng)); + std::generate(w96_data.begin(), w96_data.end(), std::ref(f32rng)); + std::generate(w97_data.begin(), w97_data.end(), std::ref(f32rng)); + std::generate(w98_data.begin(), w98_data.end(), std::ref(f32rng)); + std::generate(w99_data.begin(), w99_data.end(), std::ref(f32rng)); + std::generate(w100_data.begin(), w100_data.end(), std::ref(f32rng)); + std::generate(w101_data.begin(), w101_data.end(), std::ref(f32rng)); + std::generate(w102_data.begin(), w102_data.end(), std::ref(f32rng)); + std::generate(w103_data.begin(), w103_data.end(), std::ref(f32rng)); + std::generate(w104_data.begin(), w104_data.end(), std::ref(f32rng)); + std::generate(w105_data.begin(), w105_data.end(), std::ref(f32rng)); + std::generate(w106_data.begin(), w106_data.end(), std::ref(f32rng)); + std::generate(w107_data.begin(), w107_data.end(), std::ref(f32rng)); + std::generate(w108_data.begin(), w108_data.end(), std::ref(f32rng)); + std::generate(w109_data.begin(), w109_data.end(), std::ref(f32rng)); + std::generate(w110_data.begin(), w110_data.end(), std::ref(f32rng)); + std::generate(w111_data.begin(), w111_data.end(), std::ref(f32rng)); + std::generate(w112_data.begin(), w112_data.end(), std::ref(f32rng)); + std::generate(w113_data.begin(), w113_data.end(), std::ref(f32rng)); + std::generate(w114_data.begin(), w114_data.end(), std::ref(f32rng)); + std::generate(w115_data.begin(), w115_data.end(), std::ref(f32rng)); + std::generate(w116_data.begin(), w116_data.end(), std::ref(f32rng)); + std::generate(w117_data.begin(), w117_data.end(), std::ref(f32rng)); + std::generate(w118_data.begin(), w118_data.end(), std::ref(f32rng)); + std::generate(w119_data.begin(), w119_data.end(), std::ref(f32rng)); + std::generate(w120_data.begin(), w120_data.end(), std::ref(f32rng)); + std::generate(w121_data.begin(), w121_data.end(), std::ref(f32rng)); + std::generate(w122_data.begin(), w122_data.end(), std::ref(f32rng)); + std::generate(w123_data.begin(), w123_data.end(), std::ref(f32rng)); + std::generate(w124_data.begin(), w124_data.end(), std::ref(f32rng)); + std::generate(w125_data.begin(), w125_data.end(), std::ref(f32rng)); + std::generate(w126_data.begin(), w126_data.end(), std::ref(f32rng)); + std::generate(w127_data.begin(), w127_data.end(), std::ref(f32rng)); + std::generate(w128_data.begin(), w128_data.end(), std::ref(f32rng)); + std::generate(w129_data.begin(), w129_data.end(), std::ref(f32rng)); + std::generate(w130_data.begin(), w130_data.end(), std::ref(f32rng)); + std::generate(w131_data.begin(), w131_data.end(), std::ref(f32rng)); + std::generate(w132_data.begin(), w132_data.end(), std::ref(f32rng)); + std::generate(w133_data.begin(), w133_data.end(), std::ref(f32rng)); + std::generate(w134_data.begin(), w134_data.end(), std::ref(f32rng)); + std::generate(w135_data.begin(), w135_data.end(), std::ref(f32rng)); + std::generate(w136_data.begin(), w136_data.end(), std::ref(f32rng)); + std::generate(w137_data.begin(), w137_data.end(), std::ref(f32rng)); + std::generate(w138_data.begin(), w138_data.end(), std::ref(f32rng)); + std::generate(w139_data.begin(), w139_data.end(), std::ref(f32rng)); + std::generate(w140_data.begin(), w140_data.end(), std::ref(f32rng)); + std::generate(w141_data.begin(), w141_data.end(), std::ref(f32rng)); + std::generate(w142_data.begin(), w142_data.end(), std::ref(f32rng)); + std::generate(w143_data.begin(), w143_data.end(), std::ref(f32rng)); + std::generate(w144_data.begin(), w144_data.end(), std::ref(f32rng)); + std::generate(w145_data.begin(), w145_data.end(), std::ref(f32rng)); + std::generate(w146_data.begin(), w146_data.end(), std::ref(f32rng)); + std::generate(w147_data.begin(), w147_data.end(), std::ref(f32rng)); + std::generate(w148_data.begin(), w148_data.end(), std::ref(f32rng)); + std::generate(w149_data.begin(), w149_data.end(), std::ref(f32rng)); + std::generate(w150_data.begin(), w150_data.end(), std::ref(f32rng)); + std::generate(w151_data.begin(), w151_data.end(), std::ref(f32rng)); + std::generate(w152_data.begin(), w152_data.end(), std::ref(f32rng)); + std::generate(w153_data.begin(), w153_data.end(), std::ref(f32rng)); + std::generate(w154_data.begin(), w154_data.end(), std::ref(f32rng)); + std::generate(w155_data.begin(), w155_data.end(), std::ref(f32rng)); + std::generate(w156_data.begin(), w156_data.end(), std::ref(f32rng)); + std::generate(w157_data.begin(), w157_data.end(), std::ref(f32rng)); + std::generate(w158_data.begin(), w158_data.end(), std::ref(f32rng)); + std::generate(w159_data.begin(), w159_data.end(), std::ref(f32rng)); + std::generate(w160_data.begin(), w160_data.end(), std::ref(f32rng)); + std::generate(w161_data.begin(), w161_data.end(), std::ref(f32rng)); + std::generate(w162_data.begin(), w162_data.end(), std::ref(f32rng)); + std::generate(w163_data.begin(), w163_data.end(), std::ref(f32rng)); + std::generate(w164_data.begin(), w164_data.end(), std::ref(f32rng)); + std::generate(w165_data.begin(), w165_data.end(), std::ref(f32rng)); + std::generate(w166_data.begin(), w166_data.end(), std::ref(f32rng)); + std::generate(w167_data.begin(), w167_data.end(), std::ref(f32rng)); + std::generate(w168_data.begin(), w168_data.end(), std::ref(f32rng)); + std::generate(w169_data.begin(), w169_data.end(), std::ref(f32rng)); + std::generate(w170_data.begin(), w170_data.end(), std::ref(f32rng)); + std::generate(w171_data.begin(), w171_data.end(), std::ref(f32rng)); + std::generate(w172_data.begin(), w172_data.end(), std::ref(f32rng)); + std::generate(w173_data.begin(), w173_data.end(), std::ref(i32rng)); + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/3, + /*group_output_channels=*/32, + /*output_min=*/0.0f, /*output_max=*/6.0f, v0, w67, w68, v1, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #0" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/32, + /*output_min=*/0.0f, /*output_max=*/6.0f, v1, w69, w70, v2, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #1" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/16, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v2, w71, w72, v3, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #2" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/16, + /*group_output_channels=*/96, + /*output_min=*/0.0f, /*output_max=*/6.0f, v3, w73, w74, v4, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #3" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/96, + /*output_min=*/0.0f, /*output_max=*/6.0f, v4, w75, w76, v5, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #4" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/24, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v5, w77, w78, v6, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #5" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/144, + /*output_min=*/0.0f, /*output_max=*/6.0f, v6, w79, w80, v7, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #6" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/144, + /*output_min=*/0.0f, /*output_max=*/6.0f, v7, w81, w82, v8, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #7" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/144, + /*group_output_channels=*/24, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v8, w83, w84, v9, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #8" << std::endl; + return nullptr; + } + + xnn_binary_params v10_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v10_params, + /*input1_id=*/v9, + /*input2_id=*/v6, + /*output_id=*/v10, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #9" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/144, + /*output_min=*/0.0f, /*output_max=*/6.0f, v10, w85, w86, v11, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #10" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/144, + /*output_min=*/0.0f, /*output_max=*/6.0f, v11, w87, w88, v12, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #11" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/144, + /*group_output_channels=*/32, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v12, w89, w90, v13, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #12" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/192, + /*output_min=*/0.0f, /*output_max=*/6.0f, v13, w91, w92, v14, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #13" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/192, + /*output_min=*/0.0f, /*output_max=*/6.0f, v14, w93, w94, v15, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #14" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/192, + /*group_output_channels=*/32, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v15, w95, w96, v16, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #15" << std::endl; + return nullptr; + } + + xnn_binary_params v17_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v17_params, + /*input1_id=*/v16, + /*input2_id=*/v13, + /*output_id=*/v17, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #16" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/192, + /*output_min=*/0.0f, /*output_max=*/6.0f, v17, w97, w98, v18, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #17" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/192, + /*output_min=*/0.0f, /*output_max=*/6.0f, v18, w99, w100, v19, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #18" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/192, + /*group_output_channels=*/32, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v19, w101, w102, + v20, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #19" << std::endl; + return nullptr; + } + + xnn_binary_params v21_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v21_params, + /*input1_id=*/v20, + /*input2_id=*/v17, + /*output_id=*/v21, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #20" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/192, + /*output_min=*/0.0f, /*output_max=*/6.0f, v21, w103, w104, v22, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #21" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/192, + /*output_min=*/0.0f, /*output_max=*/6.0f, v22, w105, w106, v23, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #22" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/192, + /*group_output_channels=*/64, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v23, w107, w108, + v24, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #23" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v24, w109, w110, v25, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #24" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v25, w111, w112, v26, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #25" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/384, + /*group_output_channels=*/64, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v26, w113, w114, + v27, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #26" << std::endl; + return nullptr; + } + + xnn_binary_params v28_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v28_params, + /*input1_id=*/v27, + /*input2_id=*/v24, + /*output_id=*/v28, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #27" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v28, w115, w116, v29, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #28" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v29, w117, w118, v30, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #29" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/384, + /*group_output_channels=*/64, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v30, w119, w120, + v31, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #30" << std::endl; + return nullptr; + } + + xnn_binary_params v32_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v32_params, + /*input1_id=*/v31, + /*input2_id=*/v28, + /*output_id=*/v32, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #31" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v32, w121, w122, v33, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #32" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v33, w123, w124, v34, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #33" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/384, + /*group_output_channels=*/64, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v34, w125, w126, + v35, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #34" << std::endl; + return nullptr; + } + + xnn_binary_params v36_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v36_params, + /*input1_id=*/v35, + /*input2_id=*/v32, + /*output_id=*/v36, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #35" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v36, w127, w128, v37, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #36" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/384, + /*output_min=*/0.0f, /*output_max=*/6.0f, v37, w129, w130, v38, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #37" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/384, + /*group_output_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v38, w131, w132, + v39, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #38" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v39, w133, w134, v40, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #39" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v40, w135, w136, v41, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #40" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v41, w137, w138, + v42, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #41" << std::endl; + return nullptr; + } + + xnn_binary_params v43_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v43_params, + /*input1_id=*/v42, + /*input2_id=*/v39, + /*output_id=*/v43, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #42" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v43, w139, w140, v44, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #43" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v44, w141, w142, v45, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #44" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v45, w143, w144, + v46, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #45" << std::endl; + return nullptr; + } + + xnn_binary_params v47_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v47_params, + /*input1_id=*/v46, + /*input2_id=*/v43, + /*output_id=*/v47, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #46" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v47, w145, w146, v48, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #47" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v48, w147, w148, v49, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #48" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/160, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v49, w149, w150, + v50, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #49" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/160, + /*group_output_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v50, w151, w152, v51, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #50" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v51, w153, w154, v52, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #51" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/160, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v52, w155, w156, + v53, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #52" << std::endl; + return nullptr; + } + + xnn_binary_params v54_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v54_params, + /*input1_id=*/v53, + /*input2_id=*/v50, + /*output_id=*/v54, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #53" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/160, + /*group_output_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v54, w157, w158, v55, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #54" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v55, w159, w160, v56, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #55" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/160, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v56, w161, w162, + v57, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #56" << std::endl; + return nullptr; + } + + xnn_binary_params v58_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v58_params, + /*input1_id=*/v57, + /*input2_id=*/v54, + /*output_id=*/v58, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #57" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/160, + /*group_output_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v58, w163, w164, v59, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #58" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v59, w165, w166, v60, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #59" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/320, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v60, w167, w168, + v61, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #60" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/320, + /*group_output_channels=*/1280, + /*output_min=*/0.0f, /*output_max=*/6.0f, v61, w169, w170, v62, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #61" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v62, v63, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #62" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/1280, + /*group_output_channels=*/1001, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v63, w171, w172, + v64, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #63" << std::endl; + return nullptr; + } + + status = xnn_define_copy(subgraph, + /*input_id=*/v64, + /*output_id=*/v65, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #64" << std::endl; + return nullptr; + } + + status = xnn_define_softmax(subgraph, v65, v66, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #65" << std::endl; + return nullptr; + } + + return subgraph; +} // NOLINT(readability/fn_size) + +} // namespace models diff --git a/bench/subgraph/fp16-mobilenet-v3-large.cc b/bench/subgraph/fp16-mobilenet-v3-large.cc new file mode 100644 index 00000000000..c784ab23ebe --- /dev/null +++ b/bench/subgraph/fp16-mobilenet-v3-large.cc @@ -0,0 +1,4886 @@ +// Copyright 2020-2025 Google LLC +// +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. +// +// Auto-generated file. Do not edit! + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "include/xnnpack.h" +#include "src/xnnpack/fp16.h" +#include "src/xnnpack/math.h" +#include "test/replicable_random_device.h" + +// align a size up to XNN_EXTRA_BYTES +#define XNN_PAD_EXTRA_BYTES(s, t) \ + (((s) + XNN_EXTRA_BYTES / sizeof(t) - 1) & ~(XNN_EXTRA_BYTES / sizeof(t) - 1)) + +namespace models { + +xnn_subgraph_t FP16MobileNetV3Large() { + xnn_status status; + xnn_subgraph_t subgraph = nullptr; + status = xnn_create_subgraph(/*num_external_values=*/2, 0, &subgraph); + if (status != xnn_status_success) { + std::cerr << "failed to create subgrpah" << std::endl; + return nullptr; + } + + xnnpack::ReplicableRandomDevice rng; + + uint32_t v0 = XNN_INVALID_VALUE_ID; + std::array v0_dims = {{1, 224, 224, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v0_dims.size(), v0_dims.data(), + /*data=*/nullptr, 0, XNN_VALUE_FLAG_EXTERNAL_INPUT, &v0); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v0" << std::endl; + return nullptr; + } + + uint32_t v1 = XNN_INVALID_VALUE_ID; + std::array v1_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v1_dims.size(), v1_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v1); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v1" << std::endl; + return nullptr; + } + + uint32_t v2 = XNN_INVALID_VALUE_ID; + std::array v2_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v2_dims.size(), v2_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v2); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v2" << std::endl; + return nullptr; + } + + uint32_t v3 = XNN_INVALID_VALUE_ID; + std::array v3_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v3_dims.size(), v3_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v3); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v3" << std::endl; + return nullptr; + } + + uint32_t v4 = XNN_INVALID_VALUE_ID; + std::array v4_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v4_dims.size(), v4_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v4); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v4" << std::endl; + return nullptr; + } + + uint32_t v5 = XNN_INVALID_VALUE_ID; + std::array v5_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v5_dims.size(), v5_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v5); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v5" << std::endl; + return nullptr; + } + + uint32_t v6 = XNN_INVALID_VALUE_ID; + std::array v6_dims = {{1, 112, 112, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v6_dims.size(), v6_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v6); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v6" << std::endl; + return nullptr; + } + + uint32_t v7 = XNN_INVALID_VALUE_ID; + std::array v7_dims = {{1, 56, 56, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v7_dims.size(), v7_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v7); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v7" << std::endl; + return nullptr; + } + + uint32_t v8 = XNN_INVALID_VALUE_ID; + std::array v8_dims = {{1, 56, 56, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v8_dims.size(), v8_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v8); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v8" << std::endl; + return nullptr; + } + + uint32_t v9 = XNN_INVALID_VALUE_ID; + std::array v9_dims = {{1, 56, 56, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v9_dims.size(), v9_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v9); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v9" << std::endl; + return nullptr; + } + + uint32_t v10 = XNN_INVALID_VALUE_ID; + std::array v10_dims = {{1, 56, 56, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v10_dims.size(), v10_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v10); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v10" << std::endl; + return nullptr; + } + + uint32_t v11 = XNN_INVALID_VALUE_ID; + std::array v11_dims = {{1, 56, 56, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v11_dims.size(), v11_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v11); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v11" << std::endl; + return nullptr; + } + + uint32_t v12 = XNN_INVALID_VALUE_ID; + std::array v12_dims = {{1, 56, 56, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v12_dims.size(), v12_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v12); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v12" << std::endl; + return nullptr; + } + + uint32_t v13 = XNN_INVALID_VALUE_ID; + std::array v13_dims = {{1, 56, 56, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v13_dims.size(), v13_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v13); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v13" << std::endl; + return nullptr; + } + + uint32_t v14 = XNN_INVALID_VALUE_ID; + std::array v14_dims = {{1, 28, 28, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v14_dims.size(), v14_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v14); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v14" << std::endl; + return nullptr; + } + + uint32_t v15 = XNN_INVALID_VALUE_ID; + std::array v15_dims = {{1, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v15_dims.size(), v15_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v15); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v15" << std::endl; + return nullptr; + } + + uint32_t v16 = XNN_INVALID_VALUE_ID; + std::array v16_dims = {{1, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v16_dims.size(), v16_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v16); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v16" << std::endl; + return nullptr; + } + + uint32_t v17 = XNN_INVALID_VALUE_ID; + std::array v17_dims = {{1, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v17_dims.size(), v17_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v17); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v17" << std::endl; + return nullptr; + } + + uint32_t v18 = XNN_INVALID_VALUE_ID; + std::array v18_dims = {{1, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v18_dims.size(), v18_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v18); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v18" << std::endl; + return nullptr; + } + + uint32_t v19 = XNN_INVALID_VALUE_ID; + std::array v19_dims = {{1, 28, 28, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v19_dims.size(), v19_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v19); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v19" << std::endl; + return nullptr; + } + + uint32_t v20 = XNN_INVALID_VALUE_ID; + std::array v20_dims = {{1, 28, 28, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v20_dims.size(), v20_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v20); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v20" << std::endl; + return nullptr; + } + + uint32_t v21 = XNN_INVALID_VALUE_ID; + std::array v21_dims = {{1, 28, 28, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v21_dims.size(), v21_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v21); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v21" << std::endl; + return nullptr; + } + + uint32_t v22 = XNN_INVALID_VALUE_ID; + std::array v22_dims = {{1, 28, 28, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v22_dims.size(), v22_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v22); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v22" << std::endl; + return nullptr; + } + + uint32_t v23 = XNN_INVALID_VALUE_ID; + std::array v23_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v23_dims.size(), v23_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v23); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v23" << std::endl; + return nullptr; + } + + uint32_t v24 = XNN_INVALID_VALUE_ID; + std::array v24_dims = {{1, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v24_dims.size(), v24_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v24); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v24" << std::endl; + return nullptr; + } + + uint32_t v25 = XNN_INVALID_VALUE_ID; + std::array v25_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v25_dims.size(), v25_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v25); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v25" << std::endl; + return nullptr; + } + + uint32_t v26 = XNN_INVALID_VALUE_ID; + std::array v26_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v26_dims.size(), v26_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v26); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v26" << std::endl; + return nullptr; + } + + uint32_t v27 = XNN_INVALID_VALUE_ID; + std::array v27_dims = {{1, 28, 28, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v27_dims.size(), v27_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v27); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v27" << std::endl; + return nullptr; + } + + uint32_t v28 = XNN_INVALID_VALUE_ID; + std::array v28_dims = {{1, 28, 28, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v28_dims.size(), v28_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v28); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v28" << std::endl; + return nullptr; + } + + uint32_t v29 = XNN_INVALID_VALUE_ID; + std::array v29_dims = {{1, 28, 28, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v29_dims.size(), v29_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v29); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v29" << std::endl; + return nullptr; + } + + uint32_t v30 = XNN_INVALID_VALUE_ID; + std::array v30_dims = {{1, 28, 28, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v30_dims.size(), v30_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v30); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v30" << std::endl; + return nullptr; + } + + uint32_t v31 = XNN_INVALID_VALUE_ID; + std::array v31_dims = {{1, 28, 28, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v31_dims.size(), v31_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v31); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v31" << std::endl; + return nullptr; + } + + uint32_t v32 = XNN_INVALID_VALUE_ID; + std::array v32_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v32_dims.size(), v32_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v32); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v32" << std::endl; + return nullptr; + } + + uint32_t v33 = XNN_INVALID_VALUE_ID; + std::array v33_dims = {{1, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v33_dims.size(), v33_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v33); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v33" << std::endl; + return nullptr; + } + + uint32_t v34 = XNN_INVALID_VALUE_ID; + std::array v34_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v34_dims.size(), v34_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v34); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v34" << std::endl; + return nullptr; + } + + uint32_t v35 = XNN_INVALID_VALUE_ID; + std::array v35_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v35_dims.size(), v35_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v35); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v35" << std::endl; + return nullptr; + } + + uint32_t v36 = XNN_INVALID_VALUE_ID; + std::array v36_dims = {{1, 28, 28, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v36_dims.size(), v36_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v36); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v36" << std::endl; + return nullptr; + } + + uint32_t v37 = XNN_INVALID_VALUE_ID; + std::array v37_dims = {{1, 28, 28, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v37_dims.size(), v37_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v37); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v37" << std::endl; + return nullptr; + } + + uint32_t v38 = XNN_INVALID_VALUE_ID; + std::array v38_dims = {{1, 28, 28, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v38_dims.size(), v38_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v38); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v38" << std::endl; + return nullptr; + } + + uint32_t v39 = XNN_INVALID_VALUE_ID; + std::array v39_dims = {{1, 28, 28, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v39_dims.size(), v39_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v39); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v39" << std::endl; + return nullptr; + } + + uint32_t v40 = XNN_INVALID_VALUE_ID; + std::array v40_dims = {{1, 28, 28, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v40_dims.size(), v40_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v40); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v40" << std::endl; + return nullptr; + } + + uint32_t v41 = XNN_INVALID_VALUE_ID; + std::array v41_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v41_dims.size(), v41_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v41); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v41" << std::endl; + return nullptr; + } + + uint32_t v42 = XNN_INVALID_VALUE_ID; + std::array v42_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v42_dims.size(), v42_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v42); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v42" << std::endl; + return nullptr; + } + + uint32_t v43 = XNN_INVALID_VALUE_ID; + std::array v43_dims = {{1, 14, 14, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v43_dims.size(), v43_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v43); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v43" << std::endl; + return nullptr; + } + + uint32_t v44 = XNN_INVALID_VALUE_ID; + std::array v44_dims = {{1, 14, 14, 200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v44_dims.size(), v44_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v44); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v44" << std::endl; + return nullptr; + } + + uint32_t v45 = XNN_INVALID_VALUE_ID; + std::array v45_dims = {{1, 14, 14, 200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v45_dims.size(), v45_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v45); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v45" << std::endl; + return nullptr; + } + + uint32_t v46 = XNN_INVALID_VALUE_ID; + std::array v46_dims = {{1, 14, 14, 200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v46_dims.size(), v46_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v46); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v46" << std::endl; + return nullptr; + } + + uint32_t v47 = XNN_INVALID_VALUE_ID; + std::array v47_dims = {{1, 14, 14, 200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v47_dims.size(), v47_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v47); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v47" << std::endl; + return nullptr; + } + + uint32_t v48 = XNN_INVALID_VALUE_ID; + std::array v48_dims = {{1, 14, 14, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v48_dims.size(), v48_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v48); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v48" << std::endl; + return nullptr; + } + + uint32_t v49 = XNN_INVALID_VALUE_ID; + std::array v49_dims = {{1, 14, 14, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v49_dims.size(), v49_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v49); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v49" << std::endl; + return nullptr; + } + + uint32_t v50 = XNN_INVALID_VALUE_ID; + std::array v50_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v50_dims.size(), v50_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v50); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v50" << std::endl; + return nullptr; + } + + uint32_t v51 = XNN_INVALID_VALUE_ID; + std::array v51_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v51_dims.size(), v51_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v51); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v51" << std::endl; + return nullptr; + } + + uint32_t v52 = XNN_INVALID_VALUE_ID; + std::array v52_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v52_dims.size(), v52_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v52); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v52" << std::endl; + return nullptr; + } + + uint32_t v53 = XNN_INVALID_VALUE_ID; + std::array v53_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v53_dims.size(), v53_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v53); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v53" << std::endl; + return nullptr; + } + + uint32_t v54 = XNN_INVALID_VALUE_ID; + std::array v54_dims = {{1, 14, 14, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v54_dims.size(), v54_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v54); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v54" << std::endl; + return nullptr; + } + + uint32_t v55 = XNN_INVALID_VALUE_ID; + std::array v55_dims = {{1, 14, 14, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v55_dims.size(), v55_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v55); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v55" << std::endl; + return nullptr; + } + + uint32_t v56 = XNN_INVALID_VALUE_ID; + std::array v56_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v56_dims.size(), v56_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v56); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v56" << std::endl; + return nullptr; + } + + uint32_t v57 = XNN_INVALID_VALUE_ID; + std::array v57_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v57_dims.size(), v57_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v57); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v57" << std::endl; + return nullptr; + } + + uint32_t v58 = XNN_INVALID_VALUE_ID; + std::array v58_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v58_dims.size(), v58_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v58); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v58" << std::endl; + return nullptr; + } + + uint32_t v59 = XNN_INVALID_VALUE_ID; + std::array v59_dims = {{1, 14, 14, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v59_dims.size(), v59_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v59); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v59" << std::endl; + return nullptr; + } + + uint32_t v60 = XNN_INVALID_VALUE_ID; + std::array v60_dims = {{1, 14, 14, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v60_dims.size(), v60_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v60); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v60" << std::endl; + return nullptr; + } + + uint32_t v61 = XNN_INVALID_VALUE_ID; + std::array v61_dims = {{1, 14, 14, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v61_dims.size(), v61_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v61); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v61" << std::endl; + return nullptr; + } + + uint32_t v62 = XNN_INVALID_VALUE_ID; + std::array v62_dims = {{1, 14, 14, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v62_dims.size(), v62_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v62); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v62" << std::endl; + return nullptr; + } + + uint32_t v63 = XNN_INVALID_VALUE_ID; + std::array v63_dims = {{1, 14, 14, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v63_dims.size(), v63_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v63); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v63" << std::endl; + return nullptr; + } + + uint32_t v64 = XNN_INVALID_VALUE_ID; + std::array v64_dims = {{1, 14, 14, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v64_dims.size(), v64_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v64); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v64" << std::endl; + return nullptr; + } + + uint32_t v65 = XNN_INVALID_VALUE_ID; + std::array v65_dims = {{1, 14, 14, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v65_dims.size(), v65_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v65); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v65" << std::endl; + return nullptr; + } + + uint32_t v66 = XNN_INVALID_VALUE_ID; + std::array v66_dims = {{1, 1, 1, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v66_dims.size(), v66_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v66); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v66" << std::endl; + return nullptr; + } + + uint32_t v67 = XNN_INVALID_VALUE_ID; + std::array v67_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v67_dims.size(), v67_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v67); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v67" << std::endl; + return nullptr; + } + + uint32_t v68 = XNN_INVALID_VALUE_ID; + std::array v68_dims = {{1, 1, 1, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v68_dims.size(), v68_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v68); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v68" << std::endl; + return nullptr; + } + + uint32_t v69 = XNN_INVALID_VALUE_ID; + std::array v69_dims = {{1, 1, 1, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v69_dims.size(), v69_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v69); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v69" << std::endl; + return nullptr; + } + + uint32_t v70 = XNN_INVALID_VALUE_ID; + std::array v70_dims = {{1, 14, 14, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v70_dims.size(), v70_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v70); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v70" << std::endl; + return nullptr; + } + + uint32_t v71 = XNN_INVALID_VALUE_ID; + std::array v71_dims = {{1, 14, 14, 112}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v71_dims.size(), v71_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v71); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v71" << std::endl; + return nullptr; + } + + uint32_t v72 = XNN_INVALID_VALUE_ID; + std::array v72_dims = {{1, 14, 14, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v72_dims.size(), v72_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v72); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v72" << std::endl; + return nullptr; + } + + uint32_t v73 = XNN_INVALID_VALUE_ID; + std::array v73_dims = {{1, 14, 14, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v73_dims.size(), v73_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v73); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v73" << std::endl; + return nullptr; + } + + uint32_t v74 = XNN_INVALID_VALUE_ID; + std::array v74_dims = {{1, 14, 14, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v74_dims.size(), v74_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v74); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v74" << std::endl; + return nullptr; + } + + uint32_t v75 = XNN_INVALID_VALUE_ID; + std::array v75_dims = {{1, 14, 14, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v75_dims.size(), v75_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v75); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v75" << std::endl; + return nullptr; + } + + uint32_t v76 = XNN_INVALID_VALUE_ID; + std::array v76_dims = {{1, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v76_dims.size(), v76_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v76); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v76" << std::endl; + return nullptr; + } + + uint32_t v77 = XNN_INVALID_VALUE_ID; + std::array v77_dims = {{1, 1, 1, 168}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v77_dims.size(), v77_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v77); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v77" << std::endl; + return nullptr; + } + + uint32_t v78 = XNN_INVALID_VALUE_ID; + std::array v78_dims = {{1, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v78_dims.size(), v78_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v78); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v78" << std::endl; + return nullptr; + } + + uint32_t v79 = XNN_INVALID_VALUE_ID; + std::array v79_dims = {{1, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v79_dims.size(), v79_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v79); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v79" << std::endl; + return nullptr; + } + + uint32_t v80 = XNN_INVALID_VALUE_ID; + std::array v80_dims = {{1, 14, 14, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v80_dims.size(), v80_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v80); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v80" << std::endl; + return nullptr; + } + + uint32_t v81 = XNN_INVALID_VALUE_ID; + std::array v81_dims = {{1, 14, 14, 112}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v81_dims.size(), v81_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v81); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v81" << std::endl; + return nullptr; + } + + uint32_t v82 = XNN_INVALID_VALUE_ID; + std::array v82_dims = {{1, 14, 14, 112}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v82_dims.size(), v82_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v82); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v82" << std::endl; + return nullptr; + } + + uint32_t v83 = XNN_INVALID_VALUE_ID; + std::array v83_dims = {{1, 14, 14, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v83_dims.size(), v83_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v83); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v83" << std::endl; + return nullptr; + } + + uint32_t v84 = XNN_INVALID_VALUE_ID; + std::array v84_dims = {{1, 14, 14, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v84_dims.size(), v84_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v84); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v84" << std::endl; + return nullptr; + } + + uint32_t v85 = XNN_INVALID_VALUE_ID; + std::array v85_dims = {{1, 7, 7, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v85_dims.size(), v85_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v85); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v85" << std::endl; + return nullptr; + } + + uint32_t v86 = XNN_INVALID_VALUE_ID; + std::array v86_dims = {{1, 7, 7, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v86_dims.size(), v86_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v86); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v86" << std::endl; + return nullptr; + } + + uint32_t v87 = XNN_INVALID_VALUE_ID; + std::array v87_dims = {{1, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v87_dims.size(), v87_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v87); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v87" << std::endl; + return nullptr; + } + + uint32_t v88 = XNN_INVALID_VALUE_ID; + std::array v88_dims = {{1, 1, 1, 168}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v88_dims.size(), v88_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v88); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v88" << std::endl; + return nullptr; + } + + uint32_t v89 = XNN_INVALID_VALUE_ID; + std::array v89_dims = {{1, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v89_dims.size(), v89_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v89); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v89" << std::endl; + return nullptr; + } + + uint32_t v90 = XNN_INVALID_VALUE_ID; + std::array v90_dims = {{1, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v90_dims.size(), v90_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v90); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v90" << std::endl; + return nullptr; + } + + uint32_t v91 = XNN_INVALID_VALUE_ID; + std::array v91_dims = {{1, 7, 7, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v91_dims.size(), v91_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v91); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v91" << std::endl; + return nullptr; + } + + uint32_t v92 = XNN_INVALID_VALUE_ID; + std::array v92_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v92_dims.size(), v92_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v92); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v92" << std::endl; + return nullptr; + } + + uint32_t v93 = XNN_INVALID_VALUE_ID; + std::array v93_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v93_dims.size(), v93_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v93); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v93" << std::endl; + return nullptr; + } + + uint32_t v94 = XNN_INVALID_VALUE_ID; + std::array v94_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v94_dims.size(), v94_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v94); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v94" << std::endl; + return nullptr; + } + + uint32_t v95 = XNN_INVALID_VALUE_ID; + std::array v95_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v95_dims.size(), v95_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v95); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v95" << std::endl; + return nullptr; + } + + uint32_t v96 = XNN_INVALID_VALUE_ID; + std::array v96_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v96_dims.size(), v96_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v96); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v96" << std::endl; + return nullptr; + } + + uint32_t v97 = XNN_INVALID_VALUE_ID; + std::array v97_dims = {{1, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v97_dims.size(), v97_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v97); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v97" << std::endl; + return nullptr; + } + + uint32_t v98 = XNN_INVALID_VALUE_ID; + std::array v98_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v98_dims.size(), v98_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v98); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v98" << std::endl; + return nullptr; + } + + uint32_t v99 = XNN_INVALID_VALUE_ID; + std::array v99_dims = {{1, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v99_dims.size(), v99_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v99); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v99" << std::endl; + return nullptr; + } + + uint32_t v100 = XNN_INVALID_VALUE_ID; + std::array v100_dims = {{1, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v100_dims.size(), v100_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v100); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v100" << std::endl; + return nullptr; + } + + uint32_t v101 = XNN_INVALID_VALUE_ID; + std::array v101_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v101_dims.size(), v101_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v101); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v101" << std::endl; + return nullptr; + } + + uint32_t v102 = XNN_INVALID_VALUE_ID; + std::array v102_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v102_dims.size(), v102_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v102); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v102" << std::endl; + return nullptr; + } + + uint32_t v103 = XNN_INVALID_VALUE_ID; + std::array v103_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v103_dims.size(), v103_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v103); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v103" << std::endl; + return nullptr; + } + + uint32_t v104 = XNN_INVALID_VALUE_ID; + std::array v104_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v104_dims.size(), v104_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v104); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v104" << std::endl; + return nullptr; + } + + uint32_t v105 = XNN_INVALID_VALUE_ID; + std::array v105_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v105_dims.size(), v105_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v105); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v105" << std::endl; + return nullptr; + } + + uint32_t v106 = XNN_INVALID_VALUE_ID; + std::array v106_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v106_dims.size(), v106_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v106); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v106" << std::endl; + return nullptr; + } + + uint32_t v107 = XNN_INVALID_VALUE_ID; + std::array v107_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v107_dims.size(), v107_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v107); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v107" << std::endl; + return nullptr; + } + + uint32_t v108 = XNN_INVALID_VALUE_ID; + std::array v108_dims = {{1, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v108_dims.size(), v108_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v108); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v108" << std::endl; + return nullptr; + } + + uint32_t v109 = XNN_INVALID_VALUE_ID; + std::array v109_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v109_dims.size(), v109_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v109); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v109" << std::endl; + return nullptr; + } + + uint32_t v110 = XNN_INVALID_VALUE_ID; + std::array v110_dims = {{1, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v110_dims.size(), v110_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v110); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v110" << std::endl; + return nullptr; + } + + uint32_t v111 = XNN_INVALID_VALUE_ID; + std::array v111_dims = {{1, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v111_dims.size(), v111_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v111); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v111" << std::endl; + return nullptr; + } + + uint32_t v112 = XNN_INVALID_VALUE_ID; + std::array v112_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v112_dims.size(), v112_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v112); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v112" << std::endl; + return nullptr; + } + + uint32_t v113 = XNN_INVALID_VALUE_ID; + std::array v113_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v113_dims.size(), v113_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v113); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v113" << std::endl; + return nullptr; + } + + uint32_t v114 = XNN_INVALID_VALUE_ID; + std::array v114_dims = {{1, 7, 7, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v114_dims.size(), v114_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v114); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v114" << std::endl; + return nullptr; + } + + uint32_t v115 = XNN_INVALID_VALUE_ID; + std::array v115_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v115_dims.size(), v115_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v115); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v115" << std::endl; + return nullptr; + } + + uint32_t v116 = XNN_INVALID_VALUE_ID; + std::array v116_dims = {{1, 7, 7, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v116_dims.size(), v116_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v116); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v116" << std::endl; + return nullptr; + } + + uint32_t v117 = XNN_INVALID_VALUE_ID; + std::array v117_dims = {{1, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v117_dims.size(), v117_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v117); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v117" << std::endl; + return nullptr; + } + + uint32_t v118 = XNN_INVALID_VALUE_ID; + std::array v118_dims = {{1, 1, 1, 1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v118_dims.size(), v118_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v118); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v118" << std::endl; + return nullptr; + } + + uint32_t v119 = XNN_INVALID_VALUE_ID; + std::array v119_dims = {{1, 1, 1, 1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v119_dims.size(), v119_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v119); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v119" << std::endl; + return nullptr; + } + + uint32_t v120 = XNN_INVALID_VALUE_ID; + std::array v120_dims = {{1, 1, 1, 1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v120_dims.size(), v120_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v120); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v120" << std::endl; + return nullptr; + } + + uint32_t v121 = XNN_INVALID_VALUE_ID; + std::array v121_dims = {{1, 1, 1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v121_dims.size(), v121_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v121); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v121" << std::endl; + return nullptr; + } + + uint32_t v122 = XNN_INVALID_VALUE_ID; + std::array v122_dims = {{1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v122_dims.size(), v122_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v122); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v122" << std::endl; + return nullptr; + } + + uint32_t v123 = XNN_INVALID_VALUE_ID; + std::array v123_dims = {{1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v123_dims.size(), v123_dims.data(), + /*data=*/nullptr, 1, XNN_VALUE_FLAG_EXTERNAL_OUTPUT, &v123); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v123" << std::endl; + return nullptr; + } + + static std::vector w124_data; + w124_data.resize(XNN_PAD_EXTRA_BYTES(432, float)); + uint32_t w124 = XNN_INVALID_VALUE_ID; + std::array w124_dims = {{16, 3, 3, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w124_dims.size(), w124_dims.data(), + /*data=*/w124_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w124); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w124" << std::endl; + return nullptr; + } + + static std::vector w125_data; + w125_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w125 = XNN_INVALID_VALUE_ID; + std::array w125_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w125_dims.size(), w125_dims.data(), + /*data=*/w125_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w125); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w125" << std::endl; + return nullptr; + } + + static std::vector w126_data; + w126_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w126 = XNN_INVALID_VALUE_ID; + std::array w126_dims = {{1, 3, 3, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w126_dims.size(), w126_dims.data(), + /*data=*/w126_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w126); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w126" << std::endl; + return nullptr; + } + + static std::vector w127_data; + w127_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w127 = XNN_INVALID_VALUE_ID; + std::array w127_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w127_dims.size(), w127_dims.data(), + /*data=*/w127_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w127); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w127" << std::endl; + return nullptr; + } + + static std::vector w128_data; + w128_data.resize(XNN_PAD_EXTRA_BYTES(256, float)); + uint32_t w128 = XNN_INVALID_VALUE_ID; + std::array w128_dims = {{16, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w128_dims.size(), w128_dims.data(), + /*data=*/w128_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w128); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w128" << std::endl; + return nullptr; + } + + static std::vector w129_data; + w129_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w129 = XNN_INVALID_VALUE_ID; + std::array w129_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w129_dims.size(), w129_dims.data(), + /*data=*/w129_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w129); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w129" << std::endl; + return nullptr; + } + + static std::vector w130_data; + w130_data.resize(XNN_PAD_EXTRA_BYTES(1024, float)); + uint32_t w130 = XNN_INVALID_VALUE_ID; + std::array w130_dims = {{64, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w130_dims.size(), w130_dims.data(), + /*data=*/w130_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w130); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w130" << std::endl; + return nullptr; + } + + static std::vector w131_data; + w131_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w131 = XNN_INVALID_VALUE_ID; + std::array w131_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w131_dims.size(), w131_dims.data(), + /*data=*/w131_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w131); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w131" << std::endl; + return nullptr; + } + + static std::vector w132_data; + w132_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w132 = XNN_INVALID_VALUE_ID; + std::array w132_dims = {{1, 3, 3, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w132_dims.size(), w132_dims.data(), + /*data=*/w132_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w132); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w132" << std::endl; + return nullptr; + } + + static std::vector w133_data; + w133_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w133 = XNN_INVALID_VALUE_ID; + std::array w133_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w133_dims.size(), w133_dims.data(), + /*data=*/w133_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w133); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w133" << std::endl; + return nullptr; + } + + static std::vector w134_data; + w134_data.resize(XNN_PAD_EXTRA_BYTES(1536, float)); + uint32_t w134 = XNN_INVALID_VALUE_ID; + std::array w134_dims = {{24, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w134_dims.size(), w134_dims.data(), + /*data=*/w134_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w134); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w134" << std::endl; + return nullptr; + } + + static std::vector w135_data; + w135_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w135 = XNN_INVALID_VALUE_ID; + std::array w135_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w135_dims.size(), w135_dims.data(), + /*data=*/w135_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w135); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w135" << std::endl; + return nullptr; + } + + static std::vector w136_data; + w136_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w136 = XNN_INVALID_VALUE_ID; + std::array w136_dims = {{72, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w136_dims.size(), w136_dims.data(), + /*data=*/w136_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w136); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w136" << std::endl; + return nullptr; + } + + static std::vector w137_data; + w137_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w137 = XNN_INVALID_VALUE_ID; + std::array w137_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w137_dims.size(), w137_dims.data(), + /*data=*/w137_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w137); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w137" << std::endl; + return nullptr; + } + + static std::vector w138_data; + w138_data.resize(XNN_PAD_EXTRA_BYTES(648, float)); + uint32_t w138 = XNN_INVALID_VALUE_ID; + std::array w138_dims = {{1, 3, 3, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w138_dims.size(), w138_dims.data(), + /*data=*/w138_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w138); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w138" << std::endl; + return nullptr; + } + + static std::vector w139_data; + w139_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w139 = XNN_INVALID_VALUE_ID; + std::array w139_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w139_dims.size(), w139_dims.data(), + /*data=*/w139_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w139); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w139" << std::endl; + return nullptr; + } + + static std::vector w140_data; + w140_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w140 = XNN_INVALID_VALUE_ID; + std::array w140_dims = {{24, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w140_dims.size(), w140_dims.data(), + /*data=*/w140_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w140); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w140" << std::endl; + return nullptr; + } + + static std::vector w141_data; + w141_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w141 = XNN_INVALID_VALUE_ID; + std::array w141_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w141_dims.size(), w141_dims.data(), + /*data=*/w141_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w141); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w141" << std::endl; + return nullptr; + } + + static std::vector w142_data; + w142_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w142 = XNN_INVALID_VALUE_ID; + std::array w142_dims = {{72, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w142_dims.size(), w142_dims.data(), + /*data=*/w142_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w142); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w142" << std::endl; + return nullptr; + } + + static std::vector w143_data; + w143_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w143 = XNN_INVALID_VALUE_ID; + std::array w143_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w143_dims.size(), w143_dims.data(), + /*data=*/w143_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w143); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w143" << std::endl; + return nullptr; + } + + static std::vector w144_data; + w144_data.resize(XNN_PAD_EXTRA_BYTES(1800, float)); + uint32_t w144 = XNN_INVALID_VALUE_ID; + std::array w144_dims = {{1, 5, 5, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w144_dims.size(), w144_dims.data(), + /*data=*/w144_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w144); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w144" << std::endl; + return nullptr; + } + + static std::vector w145_data; + w145_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w145 = XNN_INVALID_VALUE_ID; + std::array w145_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w145_dims.size(), w145_dims.data(), + /*data=*/w145_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w145); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w145" << std::endl; + return nullptr; + } + + static std::vector w146_data; + w146_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w146 = XNN_INVALID_VALUE_ID; + std::array w146_dims = {{24, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w146_dims.size(), w146_dims.data(), + /*data=*/w146_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w146); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w146" << std::endl; + return nullptr; + } + + static std::vector w147_data; + w147_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w147 = XNN_INVALID_VALUE_ID; + std::array w147_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w147_dims.size(), w147_dims.data(), + /*data=*/w147_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w147); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w147" << std::endl; + return nullptr; + } + + static std::vector w148_data; + w148_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w148 = XNN_INVALID_VALUE_ID; + std::array w148_dims = {{72, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w148_dims.size(), w148_dims.data(), + /*data=*/w148_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w148); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w148" << std::endl; + return nullptr; + } + + static std::vector w149_data; + w149_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w149 = XNN_INVALID_VALUE_ID; + std::array w149_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w149_dims.size(), w149_dims.data(), + /*data=*/w149_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w149); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w149" << std::endl; + return nullptr; + } + + static std::vector w150_data; + w150_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w150 = XNN_INVALID_VALUE_ID; + std::array w150_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w150_dims.size(), w150_dims.data(), + /*data=*/w150_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w150); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w150" << std::endl; + return nullptr; + } + + static std::vector w151_data; + w151_data.resize(XNN_PAD_EXTRA_BYTES(2880, float)); + uint32_t w151 = XNN_INVALID_VALUE_ID; + std::array w151_dims = {{40, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w151_dims.size(), w151_dims.data(), + /*data=*/w151_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w151); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w151" << std::endl; + return nullptr; + } + + static std::vector w152_data; + w152_data.resize(XNN_PAD_EXTRA_BYTES(40, float)); + uint32_t w152 = XNN_INVALID_VALUE_ID; + std::array w152_dims = {{40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w152_dims.size(), w152_dims.data(), + /*data=*/w152_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w152); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w152" << std::endl; + return nullptr; + } + + static std::vector w153_data; + w153_data.resize(XNN_PAD_EXTRA_BYTES(4800, float)); + uint32_t w153 = XNN_INVALID_VALUE_ID; + std::array w153_dims = {{120, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w153_dims.size(), w153_dims.data(), + /*data=*/w153_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w153); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w153" << std::endl; + return nullptr; + } + + static std::vector w154_data; + w154_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w154 = XNN_INVALID_VALUE_ID; + std::array w154_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w154_dims.size(), w154_dims.data(), + /*data=*/w154_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w154); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w154" << std::endl; + return nullptr; + } + + static std::vector w155_data; + w155_data.resize(XNN_PAD_EXTRA_BYTES(3000, float)); + uint32_t w155 = XNN_INVALID_VALUE_ID; + std::array w155_dims = {{1, 5, 5, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w155_dims.size(), w155_dims.data(), + /*data=*/w155_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w155); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w155" << std::endl; + return nullptr; + } + + static std::vector w156_data; + w156_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w156 = XNN_INVALID_VALUE_ID; + std::array w156_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w156_dims.size(), w156_dims.data(), + /*data=*/w156_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w156); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w156" << std::endl; + return nullptr; + } + + static std::vector w157_data; + w157_data.resize(XNN_PAD_EXTRA_BYTES(3840, float)); + uint32_t w157 = XNN_INVALID_VALUE_ID; + std::array w157_dims = {{32, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w157_dims.size(), w157_dims.data(), + /*data=*/w157_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w157); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w157" << std::endl; + return nullptr; + } + + static std::vector w158_data; + w158_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w158 = XNN_INVALID_VALUE_ID; + std::array w158_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w158_dims.size(), w158_dims.data(), + /*data=*/w158_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w158); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w158" << std::endl; + return nullptr; + } + + static std::vector w159_data; + w159_data.resize(XNN_PAD_EXTRA_BYTES(3840, float)); + uint32_t w159 = XNN_INVALID_VALUE_ID; + std::array w159_dims = {{120, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w159_dims.size(), w159_dims.data(), + /*data=*/w159_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w159); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w159" << std::endl; + return nullptr; + } + + static std::vector w160_data; + w160_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w160 = XNN_INVALID_VALUE_ID; + std::array w160_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w160_dims.size(), w160_dims.data(), + /*data=*/w160_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w160); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w160" << std::endl; + return nullptr; + } + + static std::vector w161_data; + w161_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w161 = XNN_INVALID_VALUE_ID; + std::array w161_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w161_dims.size(), w161_dims.data(), + /*data=*/w161_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w161); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w161" << std::endl; + return nullptr; + } + + static std::vector w162_data; + w162_data.resize(XNN_PAD_EXTRA_BYTES(4800, float)); + uint32_t w162 = XNN_INVALID_VALUE_ID; + std::array w162_dims = {{40, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w162_dims.size(), w162_dims.data(), + /*data=*/w162_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w162); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w162" << std::endl; + return nullptr; + } + + static std::vector w163_data; + w163_data.resize(XNN_PAD_EXTRA_BYTES(40, float)); + uint32_t w163 = XNN_INVALID_VALUE_ID; + std::array w163_dims = {{40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w163_dims.size(), w163_dims.data(), + /*data=*/w163_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w163); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w163" << std::endl; + return nullptr; + } + + static std::vector w164_data; + w164_data.resize(XNN_PAD_EXTRA_BYTES(4800, float)); + uint32_t w164 = XNN_INVALID_VALUE_ID; + std::array w164_dims = {{120, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w164_dims.size(), w164_dims.data(), + /*data=*/w164_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w164); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w164" << std::endl; + return nullptr; + } + + static std::vector w165_data; + w165_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w165 = XNN_INVALID_VALUE_ID; + std::array w165_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w165_dims.size(), w165_dims.data(), + /*data=*/w165_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w165); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w165" << std::endl; + return nullptr; + } + + static std::vector w166_data; + w166_data.resize(XNN_PAD_EXTRA_BYTES(3000, float)); + uint32_t w166 = XNN_INVALID_VALUE_ID; + std::array w166_dims = {{1, 5, 5, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w166_dims.size(), w166_dims.data(), + /*data=*/w166_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w166); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w166" << std::endl; + return nullptr; + } + + static std::vector w167_data; + w167_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w167 = XNN_INVALID_VALUE_ID; + std::array w167_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w167_dims.size(), w167_dims.data(), + /*data=*/w167_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w167); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w167" << std::endl; + return nullptr; + } + + static std::vector w168_data; + w168_data.resize(XNN_PAD_EXTRA_BYTES(3840, float)); + uint32_t w168 = XNN_INVALID_VALUE_ID; + std::array w168_dims = {{32, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w168_dims.size(), w168_dims.data(), + /*data=*/w168_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w168); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w168" << std::endl; + return nullptr; + } + + static std::vector w169_data; + w169_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w169 = XNN_INVALID_VALUE_ID; + std::array w169_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w169_dims.size(), w169_dims.data(), + /*data=*/w169_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w169); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w169" << std::endl; + return nullptr; + } + + static std::vector w170_data; + w170_data.resize(XNN_PAD_EXTRA_BYTES(3840, float)); + uint32_t w170 = XNN_INVALID_VALUE_ID; + std::array w170_dims = {{120, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w170_dims.size(), w170_dims.data(), + /*data=*/w170_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w170); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w170" << std::endl; + return nullptr; + } + + static std::vector w171_data; + w171_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w171 = XNN_INVALID_VALUE_ID; + std::array w171_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w171_dims.size(), w171_dims.data(), + /*data=*/w171_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w171); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w171" << std::endl; + return nullptr; + } + + static std::vector w172_data; + w172_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w172 = XNN_INVALID_VALUE_ID; + std::array w172_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w172_dims.size(), w172_dims.data(), + /*data=*/w172_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w172); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w172" << std::endl; + return nullptr; + } + + static std::vector w173_data; + w173_data.resize(XNN_PAD_EXTRA_BYTES(4800, float)); + uint32_t w173 = XNN_INVALID_VALUE_ID; + std::array w173_dims = {{40, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w173_dims.size(), w173_dims.data(), + /*data=*/w173_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w173); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w173" << std::endl; + return nullptr; + } + + static std::vector w174_data; + w174_data.resize(XNN_PAD_EXTRA_BYTES(40, float)); + uint32_t w174 = XNN_INVALID_VALUE_ID; + std::array w174_dims = {{40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w174_dims.size(), w174_dims.data(), + /*data=*/w174_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w174); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w174" << std::endl; + return nullptr; + } + + static std::vector w175_data; + w175_data.resize(XNN_PAD_EXTRA_BYTES(9600, float)); + uint32_t w175 = XNN_INVALID_VALUE_ID; + std::array w175_dims = {{240, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w175_dims.size(), w175_dims.data(), + /*data=*/w175_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w175); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w175" << std::endl; + return nullptr; + } + + static std::vector w176_data; + w176_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w176 = XNN_INVALID_VALUE_ID; + std::array w176_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w176_dims.size(), w176_dims.data(), + /*data=*/w176_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w176); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w176" << std::endl; + return nullptr; + } + + static std::vector w177_data; + w177_data.resize(XNN_PAD_EXTRA_BYTES(2160, float)); + uint32_t w177 = XNN_INVALID_VALUE_ID; + std::array w177_dims = {{1, 3, 3, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w177_dims.size(), w177_dims.data(), + /*data=*/w177_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w177); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w177" << std::endl; + return nullptr; + } + + static std::vector w178_data; + w178_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w178 = XNN_INVALID_VALUE_ID; + std::array w178_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w178_dims.size(), w178_dims.data(), + /*data=*/w178_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w178); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w178" << std::endl; + return nullptr; + } + + static std::vector w179_data; + w179_data.resize(XNN_PAD_EXTRA_BYTES(19200, float)); + uint32_t w179 = XNN_INVALID_VALUE_ID; + std::array w179_dims = {{80, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w179_dims.size(), w179_dims.data(), + /*data=*/w179_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w179); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w179" << std::endl; + return nullptr; + } + + static std::vector w180_data; + w180_data.resize(XNN_PAD_EXTRA_BYTES(80, float)); + uint32_t w180 = XNN_INVALID_VALUE_ID; + std::array w180_dims = {{80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w180_dims.size(), w180_dims.data(), + /*data=*/w180_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w180); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w180" << std::endl; + return nullptr; + } + + static std::vector w181_data; + w181_data.resize(XNN_PAD_EXTRA_BYTES(16000, float)); + uint32_t w181 = XNN_INVALID_VALUE_ID; + std::array w181_dims = {{200, 1, 1, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w181_dims.size(), w181_dims.data(), + /*data=*/w181_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w181); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w181" << std::endl; + return nullptr; + } + + static std::vector w182_data; + w182_data.resize(XNN_PAD_EXTRA_BYTES(200, float)); + uint32_t w182 = XNN_INVALID_VALUE_ID; + std::array w182_dims = {{200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w182_dims.size(), w182_dims.data(), + /*data=*/w182_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w182); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w182" << std::endl; + return nullptr; + } + + static std::vector w183_data; + w183_data.resize(XNN_PAD_EXTRA_BYTES(1800, float)); + uint32_t w183 = XNN_INVALID_VALUE_ID; + std::array w183_dims = {{1, 3, 3, 200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w183_dims.size(), w183_dims.data(), + /*data=*/w183_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w183); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w183" << std::endl; + return nullptr; + } + + static std::vector w184_data; + w184_data.resize(XNN_PAD_EXTRA_BYTES(200, float)); + uint32_t w184 = XNN_INVALID_VALUE_ID; + std::array w184_dims = {{200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w184_dims.size(), w184_dims.data(), + /*data=*/w184_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w184); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w184" << std::endl; + return nullptr; + } + + static std::vector w185_data; + w185_data.resize(XNN_PAD_EXTRA_BYTES(16000, float)); + uint32_t w185 = XNN_INVALID_VALUE_ID; + std::array w185_dims = {{80, 1, 1, 200}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w185_dims.size(), w185_dims.data(), + /*data=*/w185_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w185); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w185" << std::endl; + return nullptr; + } + + static std::vector w186_data; + w186_data.resize(XNN_PAD_EXTRA_BYTES(80, float)); + uint32_t w186 = XNN_INVALID_VALUE_ID; + std::array w186_dims = {{80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w186_dims.size(), w186_dims.data(), + /*data=*/w186_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w186); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w186" << std::endl; + return nullptr; + } + + static std::vector w187_data; + w187_data.resize(XNN_PAD_EXTRA_BYTES(14720, float)); + uint32_t w187 = XNN_INVALID_VALUE_ID; + std::array w187_dims = {{184, 1, 1, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w187_dims.size(), w187_dims.data(), + /*data=*/w187_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w187); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w187" << std::endl; + return nullptr; + } + + static std::vector w188_data; + w188_data.resize(XNN_PAD_EXTRA_BYTES(184, float)); + uint32_t w188 = XNN_INVALID_VALUE_ID; + std::array w188_dims = {{184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w188_dims.size(), w188_dims.data(), + /*data=*/w188_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w188); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w188" << std::endl; + return nullptr; + } + + static std::vector w189_data; + w189_data.resize(XNN_PAD_EXTRA_BYTES(1656, float)); + uint32_t w189 = XNN_INVALID_VALUE_ID; + std::array w189_dims = {{1, 3, 3, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w189_dims.size(), w189_dims.data(), + /*data=*/w189_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w189); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w189" << std::endl; + return nullptr; + } + + static std::vector w190_data; + w190_data.resize(XNN_PAD_EXTRA_BYTES(184, float)); + uint32_t w190 = XNN_INVALID_VALUE_ID; + std::array w190_dims = {{184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w190_dims.size(), w190_dims.data(), + /*data=*/w190_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w190); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w190" << std::endl; + return nullptr; + } + + static std::vector w191_data; + w191_data.resize(XNN_PAD_EXTRA_BYTES(14720, float)); + uint32_t w191 = XNN_INVALID_VALUE_ID; + std::array w191_dims = {{80, 1, 1, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w191_dims.size(), w191_dims.data(), + /*data=*/w191_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w191); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w191" << std::endl; + return nullptr; + } + + static std::vector w192_data; + w192_data.resize(XNN_PAD_EXTRA_BYTES(80, float)); + uint32_t w192 = XNN_INVALID_VALUE_ID; + std::array w192_dims = {{80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w192_dims.size(), w192_dims.data(), + /*data=*/w192_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w192); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w192" << std::endl; + return nullptr; + } + + static std::vector w193_data; + w193_data.resize(XNN_PAD_EXTRA_BYTES(14720, float)); + uint32_t w193 = XNN_INVALID_VALUE_ID; + std::array w193_dims = {{184, 1, 1, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w193_dims.size(), w193_dims.data(), + /*data=*/w193_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w193); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w193" << std::endl; + return nullptr; + } + + static std::vector w194_data; + w194_data.resize(XNN_PAD_EXTRA_BYTES(184, float)); + uint32_t w194 = XNN_INVALID_VALUE_ID; + std::array w194_dims = {{184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w194_dims.size(), w194_dims.data(), + /*data=*/w194_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w194); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w194" << std::endl; + return nullptr; + } + + static std::vector w195_data; + w195_data.resize(XNN_PAD_EXTRA_BYTES(1656, float)); + uint32_t w195 = XNN_INVALID_VALUE_ID; + std::array w195_dims = {{1, 3, 3, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w195_dims.size(), w195_dims.data(), + /*data=*/w195_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w195); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w195" << std::endl; + return nullptr; + } + + static std::vector w196_data; + w196_data.resize(XNN_PAD_EXTRA_BYTES(184, float)); + uint32_t w196 = XNN_INVALID_VALUE_ID; + std::array w196_dims = {{184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w196_dims.size(), w196_dims.data(), + /*data=*/w196_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w196); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w196" << std::endl; + return nullptr; + } + + static std::vector w197_data; + w197_data.resize(XNN_PAD_EXTRA_BYTES(14720, float)); + uint32_t w197 = XNN_INVALID_VALUE_ID; + std::array w197_dims = {{80, 1, 1, 184}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w197_dims.size(), w197_dims.data(), + /*data=*/w197_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w197); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w197" << std::endl; + return nullptr; + } + + static std::vector w198_data; + w198_data.resize(XNN_PAD_EXTRA_BYTES(80, float)); + uint32_t w198 = XNN_INVALID_VALUE_ID; + std::array w198_dims = {{80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w198_dims.size(), w198_dims.data(), + /*data=*/w198_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w198); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w198" << std::endl; + return nullptr; + } + + static std::vector w199_data; + w199_data.resize(XNN_PAD_EXTRA_BYTES(38400, float)); + uint32_t w199 = XNN_INVALID_VALUE_ID; + std::array w199_dims = {{480, 1, 1, 80}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w199_dims.size(), w199_dims.data(), + /*data=*/w199_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w199); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w199" << std::endl; + return nullptr; + } + + static std::vector w200_data; + w200_data.resize(XNN_PAD_EXTRA_BYTES(480, float)); + uint32_t w200 = XNN_INVALID_VALUE_ID; + std::array w200_dims = {{480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w200_dims.size(), w200_dims.data(), + /*data=*/w200_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w200); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w200" << std::endl; + return nullptr; + } + + static std::vector w201_data; + w201_data.resize(XNN_PAD_EXTRA_BYTES(4320, float)); + uint32_t w201 = XNN_INVALID_VALUE_ID; + std::array w201_dims = {{1, 3, 3, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w201_dims.size(), w201_dims.data(), + /*data=*/w201_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w201); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w201" << std::endl; + return nullptr; + } + + static std::vector w202_data; + w202_data.resize(XNN_PAD_EXTRA_BYTES(480, float)); + uint32_t w202 = XNN_INVALID_VALUE_ID; + std::array w202_dims = {{480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w202_dims.size(), w202_dims.data(), + /*data=*/w202_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w202); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w202" << std::endl; + return nullptr; + } + + static std::vector w203_data; + w203_data.resize(XNN_PAD_EXTRA_BYTES(57600, float)); + uint32_t w203 = XNN_INVALID_VALUE_ID; + std::array w203_dims = {{120, 1, 1, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w203_dims.size(), w203_dims.data(), + /*data=*/w203_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w203); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w203" << std::endl; + return nullptr; + } + + static std::vector w204_data; + w204_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w204 = XNN_INVALID_VALUE_ID; + std::array w204_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w204_dims.size(), w204_dims.data(), + /*data=*/w204_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w204); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w204" << std::endl; + return nullptr; + } + + static std::vector w205_data; + w205_data.resize(XNN_PAD_EXTRA_BYTES(57600, float)); + uint32_t w205 = XNN_INVALID_VALUE_ID; + std::array w205_dims = {{480, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w205_dims.size(), w205_dims.data(), + /*data=*/w205_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w205); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w205" << std::endl; + return nullptr; + } + + static std::vector w206_data; + w206_data.resize(XNN_PAD_EXTRA_BYTES(480, float)); + uint32_t w206 = XNN_INVALID_VALUE_ID; + std::array w206_dims = {{480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w206_dims.size(), w206_dims.data(), + /*data=*/w206_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w206); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w206" << std::endl; + return nullptr; + } + + static std::vector w207_data; + w207_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w207 = XNN_INVALID_VALUE_ID; + std::array w207_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w207_dims.size(), w207_dims.data(), + /*data=*/w207_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w207); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w207" << std::endl; + return nullptr; + } + + static std::vector w208_data; + w208_data.resize(XNN_PAD_EXTRA_BYTES(53760, float)); + uint32_t w208 = XNN_INVALID_VALUE_ID; + std::array w208_dims = {{112, 1, 1, 480}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w208_dims.size(), w208_dims.data(), + /*data=*/w208_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w208); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w208" << std::endl; + return nullptr; + } + + static std::vector w209_data; + w209_data.resize(XNN_PAD_EXTRA_BYTES(112, float)); + uint32_t w209 = XNN_INVALID_VALUE_ID; + std::array w209_dims = {{112}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w209_dims.size(), w209_dims.data(), + /*data=*/w209_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w209); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w209" << std::endl; + return nullptr; + } + + static std::vector w210_data; + w210_data.resize(XNN_PAD_EXTRA_BYTES(75264, float)); + uint32_t w210 = XNN_INVALID_VALUE_ID; + std::array w210_dims = {{672, 1, 1, 112}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w210_dims.size(), w210_dims.data(), + /*data=*/w210_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w210); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w210" << std::endl; + return nullptr; + } + + static std::vector w211_data; + w211_data.resize(XNN_PAD_EXTRA_BYTES(672, float)); + uint32_t w211 = XNN_INVALID_VALUE_ID; + std::array w211_dims = {{672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w211_dims.size(), w211_dims.data(), + /*data=*/w211_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w211); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w211" << std::endl; + return nullptr; + } + + static std::vector w212_data; + w212_data.resize(XNN_PAD_EXTRA_BYTES(6048, float)); + uint32_t w212 = XNN_INVALID_VALUE_ID; + std::array w212_dims = {{1, 3, 3, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w212_dims.size(), w212_dims.data(), + /*data=*/w212_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w212); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w212" << std::endl; + return nullptr; + } + + static std::vector w213_data; + w213_data.resize(XNN_PAD_EXTRA_BYTES(672, float)); + uint32_t w213 = XNN_INVALID_VALUE_ID; + std::array w213_dims = {{672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w213_dims.size(), w213_dims.data(), + /*data=*/w213_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w213); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w213" << std::endl; + return nullptr; + } + + static std::vector w214_data; + w214_data.resize(XNN_PAD_EXTRA_BYTES(112896, float)); + uint32_t w214 = XNN_INVALID_VALUE_ID; + std::array w214_dims = {{168, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w214_dims.size(), w214_dims.data(), + /*data=*/w214_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w214); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w214" << std::endl; + return nullptr; + } + + static std::vector w215_data; + w215_data.resize(XNN_PAD_EXTRA_BYTES(168, float)); + uint32_t w215 = XNN_INVALID_VALUE_ID; + std::array w215_dims = {{168}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w215_dims.size(), w215_dims.data(), + /*data=*/w215_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w215); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w215" << std::endl; + return nullptr; + } + + static std::vector w216_data; + w216_data.resize(XNN_PAD_EXTRA_BYTES(112896, float)); + uint32_t w216 = XNN_INVALID_VALUE_ID; + std::array w216_dims = {{672, 1, 1, 168}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w216_dims.size(), w216_dims.data(), + /*data=*/w216_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w216); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w216" << std::endl; + return nullptr; + } + + static std::vector w217_data; + w217_data.resize(XNN_PAD_EXTRA_BYTES(672, float)); + uint32_t w217 = XNN_INVALID_VALUE_ID; + std::array w217_dims = {{672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w217_dims.size(), w217_dims.data(), + /*data=*/w217_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w217); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w217" << std::endl; + return nullptr; + } + + static std::vector w218_data; + w218_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w218 = XNN_INVALID_VALUE_ID; + std::array w218_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w218_dims.size(), w218_dims.data(), + /*data=*/w218_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w218); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w218" << std::endl; + return nullptr; + } + + static std::vector w219_data; + w219_data.resize(XNN_PAD_EXTRA_BYTES(75264, float)); + uint32_t w219 = XNN_INVALID_VALUE_ID; + std::array w219_dims = {{112, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w219_dims.size(), w219_dims.data(), + /*data=*/w219_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w219); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w219" << std::endl; + return nullptr; + } + + static std::vector w220_data; + w220_data.resize(XNN_PAD_EXTRA_BYTES(112, float)); + uint32_t w220 = XNN_INVALID_VALUE_ID; + std::array w220_dims = {{112}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w220_dims.size(), w220_dims.data(), + /*data=*/w220_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w220); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w220" << std::endl; + return nullptr; + } + + static std::vector w221_data; + w221_data.resize(XNN_PAD_EXTRA_BYTES(75264, float)); + uint32_t w221 = XNN_INVALID_VALUE_ID; + std::array w221_dims = {{672, 1, 1, 112}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w221_dims.size(), w221_dims.data(), + /*data=*/w221_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w221); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w221" << std::endl; + return nullptr; + } + + static std::vector w222_data; + w222_data.resize(XNN_PAD_EXTRA_BYTES(672, float)); + uint32_t w222 = XNN_INVALID_VALUE_ID; + std::array w222_dims = {{672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w222_dims.size(), w222_dims.data(), + /*data=*/w222_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w222); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w222" << std::endl; + return nullptr; + } + + static std::vector w223_data; + w223_data.resize(XNN_PAD_EXTRA_BYTES(16800, float)); + uint32_t w223 = XNN_INVALID_VALUE_ID; + std::array w223_dims = {{1, 5, 5, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w223_dims.size(), w223_dims.data(), + /*data=*/w223_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w223); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w223" << std::endl; + return nullptr; + } + + static std::vector w224_data; + w224_data.resize(XNN_PAD_EXTRA_BYTES(672, float)); + uint32_t w224 = XNN_INVALID_VALUE_ID; + std::array w224_dims = {{672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w224_dims.size(), w224_dims.data(), + /*data=*/w224_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w224); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w224" << std::endl; + return nullptr; + } + + static std::vector w225_data; + w225_data.resize(XNN_PAD_EXTRA_BYTES(112896, float)); + uint32_t w225 = XNN_INVALID_VALUE_ID; + std::array w225_dims = {{168, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w225_dims.size(), w225_dims.data(), + /*data=*/w225_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w225); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w225" << std::endl; + return nullptr; + } + + static std::vector w226_data; + w226_data.resize(XNN_PAD_EXTRA_BYTES(168, float)); + uint32_t w226 = XNN_INVALID_VALUE_ID; + std::array w226_dims = {{168}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w226_dims.size(), w226_dims.data(), + /*data=*/w226_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w226); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w226" << std::endl; + return nullptr; + } + + static std::vector w227_data; + w227_data.resize(XNN_PAD_EXTRA_BYTES(112896, float)); + uint32_t w227 = XNN_INVALID_VALUE_ID; + std::array w227_dims = {{672, 1, 1, 168}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w227_dims.size(), w227_dims.data(), + /*data=*/w227_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w227); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w227" << std::endl; + return nullptr; + } + + static std::vector w228_data; + w228_data.resize(XNN_PAD_EXTRA_BYTES(672, xnn_float16)); + uint32_t w228 = XNN_INVALID_VALUE_ID; + std::array w228_dims = {{672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w228_dims.size(), w228_dims.data(), + /*data=*/w228_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w228); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w228" << std::endl; + return nullptr; + } + + static std::vector w229_data; + w229_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w229 = XNN_INVALID_VALUE_ID; + std::array w229_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w229_dims.size(), w229_dims.data(), + /*data=*/w229_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w229); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w229" << std::endl; + return nullptr; + } + + static std::vector w230_data; + w230_data.resize(XNN_PAD_EXTRA_BYTES(107520, float)); + uint32_t w230 = XNN_INVALID_VALUE_ID; + std::array w230_dims = {{160, 1, 1, 672}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w230_dims.size(), w230_dims.data(), + /*data=*/w230_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w230); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w230" << std::endl; + return nullptr; + } + + static std::vector w231_data; + w231_data.resize(XNN_PAD_EXTRA_BYTES(160, float)); + uint32_t w231 = XNN_INVALID_VALUE_ID; + std::array w231_dims = {{160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w231_dims.size(), w231_dims.data(), + /*data=*/w231_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w231); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w231" << std::endl; + return nullptr; + } + + static std::vector w232_data; + w232_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w232 = XNN_INVALID_VALUE_ID; + std::array w232_dims = {{960, 1, 1, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w232_dims.size(), w232_dims.data(), + /*data=*/w232_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w232); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w232" << std::endl; + return nullptr; + } + + static std::vector w233_data; + w233_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w233 = XNN_INVALID_VALUE_ID; + std::array w233_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w233_dims.size(), w233_dims.data(), + /*data=*/w233_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w233); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w233" << std::endl; + return nullptr; + } + + static std::vector w234_data; + w234_data.resize(XNN_PAD_EXTRA_BYTES(24000, float)); + uint32_t w234 = XNN_INVALID_VALUE_ID; + std::array w234_dims = {{1, 5, 5, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w234_dims.size(), w234_dims.data(), + /*data=*/w234_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w234); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w234" << std::endl; + return nullptr; + } + + static std::vector w235_data; + w235_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w235 = XNN_INVALID_VALUE_ID; + std::array w235_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w235_dims.size(), w235_dims.data(), + /*data=*/w235_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w235); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w235" << std::endl; + return nullptr; + } + + static std::vector w236_data; + w236_data.resize(XNN_PAD_EXTRA_BYTES(230400, float)); + uint32_t w236 = XNN_INVALID_VALUE_ID; + std::array w236_dims = {{240, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w236_dims.size(), w236_dims.data(), + /*data=*/w236_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w236); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w236" << std::endl; + return nullptr; + } + + static std::vector w237_data; + w237_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w237 = XNN_INVALID_VALUE_ID; + std::array w237_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w237_dims.size(), w237_dims.data(), + /*data=*/w237_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w237); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w237" << std::endl; + return nullptr; + } + + static std::vector w238_data; + w238_data.resize(XNN_PAD_EXTRA_BYTES(230400, float)); + uint32_t w238 = XNN_INVALID_VALUE_ID; + std::array w238_dims = {{960, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w238_dims.size(), w238_dims.data(), + /*data=*/w238_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w238); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w238" << std::endl; + return nullptr; + } + + static std::vector w239_data; + w239_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w239 = XNN_INVALID_VALUE_ID; + std::array w239_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w239_dims.size(), w239_dims.data(), + /*data=*/w239_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w239); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w239" << std::endl; + return nullptr; + } + + static std::vector w240_data; + w240_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w240 = XNN_INVALID_VALUE_ID; + std::array w240_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w240_dims.size(), w240_dims.data(), + /*data=*/w240_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w240); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w240" << std::endl; + return nullptr; + } + + static std::vector w241_data; + w241_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w241 = XNN_INVALID_VALUE_ID; + std::array w241_dims = {{160, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w241_dims.size(), w241_dims.data(), + /*data=*/w241_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w241); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w241" << std::endl; + return nullptr; + } + + static std::vector w242_data; + w242_data.resize(XNN_PAD_EXTRA_BYTES(160, float)); + uint32_t w242 = XNN_INVALID_VALUE_ID; + std::array w242_dims = {{160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w242_dims.size(), w242_dims.data(), + /*data=*/w242_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w242); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w242" << std::endl; + return nullptr; + } + + static std::vector w243_data; + w243_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w243 = XNN_INVALID_VALUE_ID; + std::array w243_dims = {{960, 1, 1, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w243_dims.size(), w243_dims.data(), + /*data=*/w243_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w243); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w243" << std::endl; + return nullptr; + } + + static std::vector w244_data; + w244_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w244 = XNN_INVALID_VALUE_ID; + std::array w244_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w244_dims.size(), w244_dims.data(), + /*data=*/w244_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w244); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w244" << std::endl; + return nullptr; + } + + static std::vector w245_data; + w245_data.resize(XNN_PAD_EXTRA_BYTES(24000, float)); + uint32_t w245 = XNN_INVALID_VALUE_ID; + std::array w245_dims = {{1, 5, 5, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w245_dims.size(), w245_dims.data(), + /*data=*/w245_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w245); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w245" << std::endl; + return nullptr; + } + + static std::vector w246_data; + w246_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w246 = XNN_INVALID_VALUE_ID; + std::array w246_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w246_dims.size(), w246_dims.data(), + /*data=*/w246_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w246); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w246" << std::endl; + return nullptr; + } + + static std::vector w247_data; + w247_data.resize(XNN_PAD_EXTRA_BYTES(230400, float)); + uint32_t w247 = XNN_INVALID_VALUE_ID; + std::array w247_dims = {{240, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w247_dims.size(), w247_dims.data(), + /*data=*/w247_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w247); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w247" << std::endl; + return nullptr; + } + + static std::vector w248_data; + w248_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w248 = XNN_INVALID_VALUE_ID; + std::array w248_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w248_dims.size(), w248_dims.data(), + /*data=*/w248_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w248); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w248" << std::endl; + return nullptr; + } + + static std::vector w249_data; + w249_data.resize(XNN_PAD_EXTRA_BYTES(230400, float)); + uint32_t w249 = XNN_INVALID_VALUE_ID; + std::array w249_dims = {{960, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w249_dims.size(), w249_dims.data(), + /*data=*/w249_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w249); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w249" << std::endl; + return nullptr; + } + + static std::vector w250_data; + w250_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w250 = XNN_INVALID_VALUE_ID; + std::array w250_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w250_dims.size(), w250_dims.data(), + /*data=*/w250_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w250); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w250" << std::endl; + return nullptr; + } + + static std::vector w251_data; + w251_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w251 = XNN_INVALID_VALUE_ID; + std::array w251_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w251_dims.size(), w251_dims.data(), + /*data=*/w251_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w251); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w251" << std::endl; + return nullptr; + } + + static std::vector w252_data; + w252_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w252 = XNN_INVALID_VALUE_ID; + std::array w252_dims = {{160, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w252_dims.size(), w252_dims.data(), + /*data=*/w252_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w252); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w252" << std::endl; + return nullptr; + } + + static std::vector w253_data; + w253_data.resize(XNN_PAD_EXTRA_BYTES(160, float)); + uint32_t w253 = XNN_INVALID_VALUE_ID; + std::array w253_dims = {{160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w253_dims.size(), w253_dims.data(), + /*data=*/w253_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w253); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w253" << std::endl; + return nullptr; + } + + static std::vector w254_data; + w254_data.resize(XNN_PAD_EXTRA_BYTES(153600, float)); + uint32_t w254 = XNN_INVALID_VALUE_ID; + std::array w254_dims = {{960, 1, 1, 160}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w254_dims.size(), w254_dims.data(), + /*data=*/w254_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w254); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w254" << std::endl; + return nullptr; + } + + static std::vector w255_data; + w255_data.resize(XNN_PAD_EXTRA_BYTES(960, float)); + uint32_t w255 = XNN_INVALID_VALUE_ID; + std::array w255_dims = {{960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w255_dims.size(), w255_dims.data(), + /*data=*/w255_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w255); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w255" << std::endl; + return nullptr; + } + + static std::vector w256_data; + w256_data.resize(XNN_PAD_EXTRA_BYTES(1228800, float)); + uint32_t w256 = XNN_INVALID_VALUE_ID; + std::array w256_dims = {{1280, 1, 1, 960}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w256_dims.size(), w256_dims.data(), + /*data=*/w256_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w256); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w256" << std::endl; + return nullptr; + } + + static std::vector w257_data; + w257_data.resize(XNN_PAD_EXTRA_BYTES(1280, float)); + uint32_t w257 = XNN_INVALID_VALUE_ID; + std::array w257_dims = {{1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w257_dims.size(), w257_dims.data(), + /*data=*/w257_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w257); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w257" << std::endl; + return nullptr; + } + + static std::vector w258_data; + w258_data.resize(XNN_PAD_EXTRA_BYTES(1281280, float)); + uint32_t w258 = XNN_INVALID_VALUE_ID; + std::array w258_dims = {{1001, 1, 1, 1280}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w258_dims.size(), w258_dims.data(), + /*data=*/w258_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w258); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w258" << std::endl; + return nullptr; + } + + static std::vector w259_data; + w259_data.resize(XNN_PAD_EXTRA_BYTES(1001, float)); + uint32_t w259 = XNN_INVALID_VALUE_ID; + std::array w259_dims = {{1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w259_dims.size(), w259_dims.data(), + /*data=*/w259_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w259); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w259" << std::endl; + return nullptr; + } + + static std::vector w260_data; + w260_data.resize(XNN_PAD_EXTRA_BYTES(2, int32_t)); + uint32_t w260 = XNN_INVALID_VALUE_ID; + std::array w260_dims = {{2}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_int32, w260_dims.size(), w260_dims.data(), + /*data=*/w260_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w260); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w260" << std::endl; + return nullptr; + } + + auto f32rng = std::bind(std::uniform_real_distribution(-1.0f, +1.0f), + std::ref(rng)); + auto f16rng = [&]() { + return fp16_ieee_from_fp32_value(f32rng()); + }; + auto i32rng = std::bind(std::uniform_int_distribution(-10000, 10000), + std::ref(rng)); + std::generate(w124_data.begin(), w124_data.end(), std::ref(f32rng)); + std::generate(w125_data.begin(), w125_data.end(), std::ref(f32rng)); + std::generate(w126_data.begin(), w126_data.end(), std::ref(f32rng)); + std::generate(w127_data.begin(), w127_data.end(), std::ref(f32rng)); + std::generate(w128_data.begin(), w128_data.end(), std::ref(f32rng)); + std::generate(w129_data.begin(), w129_data.end(), std::ref(f32rng)); + std::generate(w130_data.begin(), w130_data.end(), std::ref(f32rng)); + std::generate(w131_data.begin(), w131_data.end(), std::ref(f32rng)); + std::generate(w132_data.begin(), w132_data.end(), std::ref(f32rng)); + std::generate(w133_data.begin(), w133_data.end(), std::ref(f32rng)); + std::generate(w134_data.begin(), w134_data.end(), std::ref(f32rng)); + std::generate(w135_data.begin(), w135_data.end(), std::ref(f32rng)); + std::generate(w136_data.begin(), w136_data.end(), std::ref(f32rng)); + std::generate(w137_data.begin(), w137_data.end(), std::ref(f32rng)); + std::generate(w138_data.begin(), w138_data.end(), std::ref(f32rng)); + std::generate(w139_data.begin(), w139_data.end(), std::ref(f32rng)); + std::generate(w140_data.begin(), w140_data.end(), std::ref(f32rng)); + std::generate(w141_data.begin(), w141_data.end(), std::ref(f32rng)); + std::generate(w142_data.begin(), w142_data.end(), std::ref(f32rng)); + std::generate(w143_data.begin(), w143_data.end(), std::ref(f32rng)); + std::generate(w144_data.begin(), w144_data.end(), std::ref(f32rng)); + std::generate(w145_data.begin(), w145_data.end(), std::ref(f32rng)); + std::generate(w146_data.begin(), w146_data.end(), std::ref(f32rng)); + std::generate(w147_data.begin(), w147_data.end(), std::ref(f32rng)); + std::generate(w148_data.begin(), w148_data.end(), std::ref(f32rng)); + std::generate(w149_data.begin(), w149_data.end(), std::ref(f32rng)); + std::generate(w150_data.begin(), w150_data.end(), std::ref(f16rng)); + std::generate(w151_data.begin(), w151_data.end(), std::ref(f32rng)); + std::generate(w152_data.begin(), w152_data.end(), std::ref(f32rng)); + std::generate(w153_data.begin(), w153_data.end(), std::ref(f32rng)); + std::generate(w154_data.begin(), w154_data.end(), std::ref(f32rng)); + std::generate(w155_data.begin(), w155_data.end(), std::ref(f32rng)); + std::generate(w156_data.begin(), w156_data.end(), std::ref(f32rng)); + std::generate(w157_data.begin(), w157_data.end(), std::ref(f32rng)); + std::generate(w158_data.begin(), w158_data.end(), std::ref(f32rng)); + std::generate(w159_data.begin(), w159_data.end(), std::ref(f32rng)); + std::generate(w160_data.begin(), w160_data.end(), std::ref(f32rng)); + std::generate(w161_data.begin(), w161_data.end(), std::ref(f16rng)); + std::generate(w162_data.begin(), w162_data.end(), std::ref(f32rng)); + std::generate(w163_data.begin(), w163_data.end(), std::ref(f32rng)); + std::generate(w164_data.begin(), w164_data.end(), std::ref(f32rng)); + std::generate(w165_data.begin(), w165_data.end(), std::ref(f32rng)); + std::generate(w166_data.begin(), w166_data.end(), std::ref(f32rng)); + std::generate(w167_data.begin(), w167_data.end(), std::ref(f32rng)); + std::generate(w168_data.begin(), w168_data.end(), std::ref(f32rng)); + std::generate(w169_data.begin(), w169_data.end(), std::ref(f32rng)); + std::generate(w170_data.begin(), w170_data.end(), std::ref(f32rng)); + std::generate(w171_data.begin(), w171_data.end(), std::ref(f32rng)); + std::generate(w172_data.begin(), w172_data.end(), std::ref(f16rng)); + std::generate(w173_data.begin(), w173_data.end(), std::ref(f32rng)); + std::generate(w174_data.begin(), w174_data.end(), std::ref(f32rng)); + std::generate(w175_data.begin(), w175_data.end(), std::ref(f32rng)); + std::generate(w176_data.begin(), w176_data.end(), std::ref(f32rng)); + std::generate(w177_data.begin(), w177_data.end(), std::ref(f32rng)); + std::generate(w178_data.begin(), w178_data.end(), std::ref(f32rng)); + std::generate(w179_data.begin(), w179_data.end(), std::ref(f32rng)); + std::generate(w180_data.begin(), w180_data.end(), std::ref(f32rng)); + std::generate(w181_data.begin(), w181_data.end(), std::ref(f32rng)); + std::generate(w182_data.begin(), w182_data.end(), std::ref(f32rng)); + std::generate(w183_data.begin(), w183_data.end(), std::ref(f32rng)); + std::generate(w184_data.begin(), w184_data.end(), std::ref(f32rng)); + std::generate(w185_data.begin(), w185_data.end(), std::ref(f32rng)); + std::generate(w186_data.begin(), w186_data.end(), std::ref(f32rng)); + std::generate(w187_data.begin(), w187_data.end(), std::ref(f32rng)); + std::generate(w188_data.begin(), w188_data.end(), std::ref(f32rng)); + std::generate(w189_data.begin(), w189_data.end(), std::ref(f32rng)); + std::generate(w190_data.begin(), w190_data.end(), std::ref(f32rng)); + std::generate(w191_data.begin(), w191_data.end(), std::ref(f32rng)); + std::generate(w192_data.begin(), w192_data.end(), std::ref(f32rng)); + std::generate(w193_data.begin(), w193_data.end(), std::ref(f32rng)); + std::generate(w194_data.begin(), w194_data.end(), std::ref(f32rng)); + std::generate(w195_data.begin(), w195_data.end(), std::ref(f32rng)); + std::generate(w196_data.begin(), w196_data.end(), std::ref(f32rng)); + std::generate(w197_data.begin(), w197_data.end(), std::ref(f32rng)); + std::generate(w198_data.begin(), w198_data.end(), std::ref(f32rng)); + std::generate(w199_data.begin(), w199_data.end(), std::ref(f32rng)); + std::generate(w200_data.begin(), w200_data.end(), std::ref(f32rng)); + std::generate(w201_data.begin(), w201_data.end(), std::ref(f32rng)); + std::generate(w202_data.begin(), w202_data.end(), std::ref(f32rng)); + std::generate(w203_data.begin(), w203_data.end(), std::ref(f32rng)); + std::generate(w204_data.begin(), w204_data.end(), std::ref(f32rng)); + std::generate(w205_data.begin(), w205_data.end(), std::ref(f32rng)); + std::generate(w206_data.begin(), w206_data.end(), std::ref(f32rng)); + std::generate(w207_data.begin(), w207_data.end(), std::ref(f16rng)); + std::generate(w208_data.begin(), w208_data.end(), std::ref(f32rng)); + std::generate(w209_data.begin(), w209_data.end(), std::ref(f32rng)); + std::generate(w210_data.begin(), w210_data.end(), std::ref(f32rng)); + std::generate(w211_data.begin(), w211_data.end(), std::ref(f32rng)); + std::generate(w212_data.begin(), w212_data.end(), std::ref(f32rng)); + std::generate(w213_data.begin(), w213_data.end(), std::ref(f32rng)); + std::generate(w214_data.begin(), w214_data.end(), std::ref(f32rng)); + std::generate(w215_data.begin(), w215_data.end(), std::ref(f32rng)); + std::generate(w216_data.begin(), w216_data.end(), std::ref(f32rng)); + std::generate(w217_data.begin(), w217_data.end(), std::ref(f32rng)); + std::generate(w218_data.begin(), w218_data.end(), std::ref(f16rng)); + std::generate(w219_data.begin(), w219_data.end(), std::ref(f32rng)); + std::generate(w220_data.begin(), w220_data.end(), std::ref(f32rng)); + std::generate(w221_data.begin(), w221_data.end(), std::ref(f32rng)); + std::generate(w222_data.begin(), w222_data.end(), std::ref(f32rng)); + std::generate(w223_data.begin(), w223_data.end(), std::ref(f32rng)); + std::generate(w224_data.begin(), w224_data.end(), std::ref(f32rng)); + std::generate(w225_data.begin(), w225_data.end(), std::ref(f32rng)); + std::generate(w226_data.begin(), w226_data.end(), std::ref(f32rng)); + std::generate(w227_data.begin(), w227_data.end(), std::ref(f32rng)); + std::generate(w228_data.begin(), w228_data.end(), std::ref(f16rng)); + std::generate(w229_data.begin(), w229_data.end(), std::ref(f16rng)); + std::generate(w230_data.begin(), w230_data.end(), std::ref(f32rng)); + std::generate(w231_data.begin(), w231_data.end(), std::ref(f32rng)); + std::generate(w232_data.begin(), w232_data.end(), std::ref(f32rng)); + std::generate(w233_data.begin(), w233_data.end(), std::ref(f32rng)); + std::generate(w234_data.begin(), w234_data.end(), std::ref(f32rng)); + std::generate(w235_data.begin(), w235_data.end(), std::ref(f32rng)); + std::generate(w236_data.begin(), w236_data.end(), std::ref(f32rng)); + std::generate(w237_data.begin(), w237_data.end(), std::ref(f32rng)); + std::generate(w238_data.begin(), w238_data.end(), std::ref(f32rng)); + std::generate(w239_data.begin(), w239_data.end(), std::ref(f32rng)); + std::generate(w240_data.begin(), w240_data.end(), std::ref(f16rng)); + std::generate(w241_data.begin(), w241_data.end(), std::ref(f32rng)); + std::generate(w242_data.begin(), w242_data.end(), std::ref(f32rng)); + std::generate(w243_data.begin(), w243_data.end(), std::ref(f32rng)); + std::generate(w244_data.begin(), w244_data.end(), std::ref(f32rng)); + std::generate(w245_data.begin(), w245_data.end(), std::ref(f32rng)); + std::generate(w246_data.begin(), w246_data.end(), std::ref(f32rng)); + std::generate(w247_data.begin(), w247_data.end(), std::ref(f32rng)); + std::generate(w248_data.begin(), w248_data.end(), std::ref(f32rng)); + std::generate(w249_data.begin(), w249_data.end(), std::ref(f32rng)); + std::generate(w250_data.begin(), w250_data.end(), std::ref(f32rng)); + std::generate(w251_data.begin(), w251_data.end(), std::ref(f16rng)); + std::generate(w252_data.begin(), w252_data.end(), std::ref(f32rng)); + std::generate(w253_data.begin(), w253_data.end(), std::ref(f32rng)); + std::generate(w254_data.begin(), w254_data.end(), std::ref(f32rng)); + std::generate(w255_data.begin(), w255_data.end(), std::ref(f32rng)); + std::generate(w256_data.begin(), w256_data.end(), std::ref(f32rng)); + std::generate(w257_data.begin(), w257_data.end(), std::ref(f32rng)); + std::generate(w258_data.begin(), w258_data.end(), std::ref(f32rng)); + std::generate(w259_data.begin(), w259_data.end(), std::ref(f32rng)); + std::generate(w260_data.begin(), w260_data.end(), std::ref(i32rng)); + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/3, + /*group_output_channels=*/16, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v0, w124, w125, v1, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #0" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v1, v2, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #1" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/16, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v2, w126, w127, v3, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #2" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/16, + /*group_output_channels=*/16, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v3, w128, w129, v4, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #3" << std::endl; + return nullptr; + } + + xnn_binary_params v5_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v5_params, + /*input1_id=*/v4, + /*input2_id=*/v2, + /*output_id=*/v5, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #4" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/16, + /*group_output_channels=*/64, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v5, w130, w131, v6, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #5" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/64, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v6, w132, w133, v7, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #6" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/24, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v7, w134, w135, v8, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #7" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/72, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v8, w136, w137, v9, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #8" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/72, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v9, w138, w139, + v10, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #9" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/72, + /*group_output_channels=*/24, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v10, w140, w141, + v11, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #10" << std::endl; + return nullptr; + } + + xnn_binary_params v12_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v12_params, + /*input1_id=*/v11, + /*input2_id=*/v8, + /*output_id=*/v12, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #11" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/72, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v12, w142, w143, + v13, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #12" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/72, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v13, w144, w145, + v14, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #13" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/28, /*pooling_width=*/28, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v14, v15, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #14" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/72, + /*group_output_channels=*/24, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v15, w146, w147, + v16, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #15" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/72, + /*output_min=*/0.0f, /*output_max=*/6.0f, v16, w148, w149, v17, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #16" << std::endl; + return nullptr; + } + + xnn_binary_params v18_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v18_params, + /*input1_id=*/v17, + /*input2_id=*/w150, + /*output_id=*/v18, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #17" << std::endl; + return nullptr; + } + + xnn_binary_params v19_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v19_params, + /*input1_id=*/v14, + /*input2_id=*/v18, + /*output_id=*/v19, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #18" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/72, + /*group_output_channels=*/40, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v19, w151, w152, + v20, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #19" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/40, + /*group_output_channels=*/120, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v20, w153, w154, + v21, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #20" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/120, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v21, w155, w156, + v22, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #21" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/28, /*pooling_width=*/28, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v22, v23, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #22" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/120, + /*group_output_channels=*/32, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v23, w157, w158, + v24, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #23" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/120, + /*output_min=*/0.0f, /*output_max=*/6.0f, v24, w159, w160, v25, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #24" << std::endl; + return nullptr; + } + + xnn_binary_params v26_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v26_params, + /*input1_id=*/v25, + /*input2_id=*/w161, + /*output_id=*/v26, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #25" << std::endl; + return nullptr; + } + + xnn_binary_params v27_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v27_params, + /*input1_id=*/v22, + /*input2_id=*/v26, + /*output_id=*/v27, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #26" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/120, + /*group_output_channels=*/40, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v27, w162, w163, + v28, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #27" << std::endl; + return nullptr; + } + + xnn_binary_params v29_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v29_params, + /*input1_id=*/v28, + /*input2_id=*/v20, + /*output_id=*/v29, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #28" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/40, + /*group_output_channels=*/120, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v29, w164, w165, + v30, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #29" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/120, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v30, w166, w167, + v31, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #30" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/28, /*pooling_width=*/28, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v31, v32, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #31" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/120, + /*group_output_channels=*/32, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v32, w168, w169, + v33, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #32" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/120, + /*output_min=*/0.0f, /*output_max=*/6.0f, v33, w170, w171, v34, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #33" << std::endl; + return nullptr; + } + + xnn_binary_params v35_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v35_params, + /*input1_id=*/v34, + /*input2_id=*/w172, + /*output_id=*/v35, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #34" << std::endl; + return nullptr; + } + + xnn_binary_params v36_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v36_params, + /*input1_id=*/v31, + /*input2_id=*/v35, + /*output_id=*/v36, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #35" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/120, + /*group_output_channels=*/40, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v36, w173, w174, + v37, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #36" << std::endl; + return nullptr; + } + + xnn_binary_params v38_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v38_params, + /*input1_id=*/v37, + /*input2_id=*/v29, + /*output_id=*/v38, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #37" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/40, + /*group_output_channels=*/240, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v38, w175, w176, + v39, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #38" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v39, v40, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #39" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/240, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v40, w177, w178, + v41, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #40" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v41, v42, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #41" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/240, + /*group_output_channels=*/80, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v42, w179, w180, + v43, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #42" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/80, + /*group_output_channels=*/200, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v43, w181, w182, + v44, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #43" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v44, v45, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #44" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/200, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v45, w183, w184, + v46, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #45" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v46, v47, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #46" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/200, + /*group_output_channels=*/80, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v47, w185, w186, + v48, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #47" << std::endl; + return nullptr; + } + + xnn_binary_params v49_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v49_params, + /*input1_id=*/v48, + /*input2_id=*/v43, + /*output_id=*/v49, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #48" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/80, + /*group_output_channels=*/184, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v49, w187, w188, + v50, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #49" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v50, v51, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #50" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/184, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v51, w189, w190, + v52, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #51" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v52, v53, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #52" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/184, + /*group_output_channels=*/80, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v53, w191, w192, + v54, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #53" << std::endl; + return nullptr; + } + + xnn_binary_params v55_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v55_params, + /*input1_id=*/v54, + /*input2_id=*/v49, + /*output_id=*/v55, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #54" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/80, + /*group_output_channels=*/184, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v55, w193, w194, + v56, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #55" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v56, v57, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #56" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/184, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v57, w195, w196, + v58, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #57" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v58, v59, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #58" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/184, + /*group_output_channels=*/80, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v59, w197, w198, + v60, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #59" << std::endl; + return nullptr; + } + + xnn_binary_params v61_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v61_params, + /*input1_id=*/v60, + /*input2_id=*/v55, + /*output_id=*/v61, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #60" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/80, + /*group_output_channels=*/480, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v61, w199, w200, + v62, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #61" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v62, v63, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #62" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/480, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v63, w201, w202, + v64, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #63" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v64, v65, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #64" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/14, /*pooling_width=*/14, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v65, v66, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #65" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/480, + /*group_output_channels=*/120, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v66, w203, w204, + v67, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #66" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/120, + /*group_output_channels=*/480, + /*output_min=*/0.0f, /*output_max=*/6.0f, v67, w205, w206, v68, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #67" << std::endl; + return nullptr; + } + + xnn_binary_params v69_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v69_params, + /*input1_id=*/v68, + /*input2_id=*/w207, + /*output_id=*/v69, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #68" << std::endl; + return nullptr; + } + + xnn_binary_params v70_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v70_params, + /*input1_id=*/v65, + /*input2_id=*/v69, + /*output_id=*/v70, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #69" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/480, + /*group_output_channels=*/112, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v70, w208, w209, + v71, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #70" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/112, + /*group_output_channels=*/672, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v71, w210, w211, + v72, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #71" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v72, v73, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #72" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/672, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v73, w212, w213, + v74, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #73" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v74, v75, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #74" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/14, /*pooling_width=*/14, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v75, v76, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #75" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/672, + /*group_output_channels=*/168, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v76, w214, w215, + v77, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #76" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/168, + /*group_output_channels=*/672, + /*output_min=*/0.0f, /*output_max=*/6.0f, v77, w216, w217, v78, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #77" << std::endl; + return nullptr; + } + + xnn_binary_params v79_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v79_params, + /*input1_id=*/v78, + /*input2_id=*/w218, + /*output_id=*/v79, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #78" << std::endl; + return nullptr; + } + + xnn_binary_params v80_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v80_params, + /*input1_id=*/v75, + /*input2_id=*/v79, + /*output_id=*/v80, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #79" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/672, + /*group_output_channels=*/112, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v80, w219, w220, + v81, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #80" << std::endl; + return nullptr; + } + + xnn_binary_params v82_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v82_params, + /*input1_id=*/v81, + /*input2_id=*/v71, + /*output_id=*/v82, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #81" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/112, + /*group_output_channels=*/672, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v82, w221, w222, + v83, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #82" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v83, v84, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #83" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/672, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v84, w223, w224, + v85, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #84" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v85, v86, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #85" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v86, v87, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #86" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/672, + /*group_output_channels=*/168, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v87, w225, w226, + v88, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #87" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/168, + /*group_output_channels=*/672, + /*output_min=*/0.0f, /*output_max=*/6.0f, v88, w227, w228, v89, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #88" << std::endl; + return nullptr; + } + + xnn_binary_params v90_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v90_params, + /*input1_id=*/v89, + /*input2_id=*/w229, + /*output_id=*/v90, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #89" << std::endl; + return nullptr; + } + + xnn_binary_params v91_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v91_params, + /*input1_id=*/v86, + /*input2_id=*/v90, + /*output_id=*/v91, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #90" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/672, + /*group_output_channels=*/160, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v91, w230, w231, + v92, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #91" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/160, + /*group_output_channels=*/960, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v92, w232, w233, + v93, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #92" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v93, v94, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #93" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/960, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v94, w234, w235, + v95, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #94" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v95, v96, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #95" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v96, v97, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #96" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/240, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v97, w236, w237, + v98, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #97" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/240, + /*group_output_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v98, w238, w239, v99, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #98" << std::endl; + return nullptr; + } + + xnn_binary_params v100_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v100_params, + /*input1_id=*/v99, + /*input2_id=*/w240, + /*output_id=*/v100, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #99" << std::endl; + return nullptr; + } + + xnn_binary_params v101_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v101_params, + /*input1_id=*/v96, + /*input2_id=*/v100, + /*output_id=*/v101, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #100" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/160, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v101, w241, w242, + v102, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #101" << std::endl; + return nullptr; + } + + xnn_binary_params v103_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v103_params, + /*input1_id=*/v102, + /*input2_id=*/v92, + /*output_id=*/v103, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #102" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/160, + /*group_output_channels=*/960, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v103, w243, w244, + v104, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #103" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v104, v105, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #104" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/960, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v105, w245, w246, + v106, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #105" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v106, v107, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #106" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v107, v108, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #107" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/240, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v108, w247, w248, + v109, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #108" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/240, + /*group_output_channels=*/960, + /*output_min=*/0.0f, /*output_max=*/6.0f, v109, w249, w250, v110, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #109" << std::endl; + return nullptr; + } + + xnn_binary_params v111_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v111_params, + /*input1_id=*/v110, + /*input2_id=*/w251, + /*output_id=*/v111, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #110" << std::endl; + return nullptr; + } + + xnn_binary_params v112_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v112_params, + /*input1_id=*/v107, + /*input2_id=*/v111, + /*output_id=*/v112, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #111" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/160, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v112, w252, w253, + v113, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #112" << std::endl; + return nullptr; + } + + xnn_binary_params v114_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v114_params, + /*input1_id=*/v113, + /*input2_id=*/v103, + /*output_id=*/v114, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #113" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/160, + /*group_output_channels=*/960, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v114, w254, w255, + v115, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #114" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v115, v116, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #115" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v116, v117, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #116" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/960, + /*group_output_channels=*/1280, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v117, w256, w257, + v118, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #117" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v118, v119, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #118" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/1, /*pooling_width=*/1, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v119, v120, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #119" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/1280, + /*group_output_channels=*/1001, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v120, w258, w259, + v121, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #120" << std::endl; + return nullptr; + } + + status = xnn_define_copy(subgraph, + /*input_id=*/v121, + /*output_id=*/v122, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #121" << std::endl; + return nullptr; + } + + status = xnn_define_softmax(subgraph, v122, v123, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #122" << std::endl; + return nullptr; + } + + return subgraph; +} // NOLINT(readability/fn_size) + +} // namespace models diff --git a/bench/subgraph/fp16-mobilenet-v3-small.cc b/bench/subgraph/fp16-mobilenet-v3-small.cc new file mode 100644 index 00000000000..7c2d62c4cd9 --- /dev/null +++ b/bench/subgraph/fp16-mobilenet-v3-small.cc @@ -0,0 +1,4298 @@ +// Copyright 2020-2025 Google LLC +// +// This source code is licensed under the BSD-style license found in the +// LICENSE file in the root directory of this source tree. +// +// Auto-generated file. Do not edit! + +#include +#include +#include +#include +#include +#include +#include +#include +#include + +#include "include/xnnpack.h" +#include "src/xnnpack/fp16.h" +#include "src/xnnpack/math.h" +#include "test/replicable_random_device.h" + +// align a size up to XNN_EXTRA_BYTES +#define XNN_PAD_EXTRA_BYTES(s, t) \ + (((s) + XNN_EXTRA_BYTES / sizeof(t) - 1) & ~(XNN_EXTRA_BYTES / sizeof(t) - 1)) + +namespace models { + +xnn_subgraph_t FP16MobileNetV3Small() { + xnn_status status; + xnn_subgraph_t subgraph = nullptr; + status = xnn_create_subgraph(/*num_external_values=*/2, 0, &subgraph); + if (status != xnn_status_success) { + std::cerr << "failed to create subgrpah" << std::endl; + return nullptr; + } + + xnnpack::ReplicableRandomDevice rng; + + uint32_t v0 = XNN_INVALID_VALUE_ID; + std::array v0_dims = {{1, 224, 224, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v0_dims.size(), v0_dims.data(), + /*data=*/nullptr, 0, XNN_VALUE_FLAG_EXTERNAL_INPUT, &v0); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v0" << std::endl; + return nullptr; + } + + uint32_t v1 = XNN_INVALID_VALUE_ID; + std::array v1_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v1_dims.size(), v1_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v1); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v1" << std::endl; + return nullptr; + } + + uint32_t v2 = XNN_INVALID_VALUE_ID; + std::array v2_dims = {{1, 112, 112, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v2_dims.size(), v2_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v2); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v2" << std::endl; + return nullptr; + } + + uint32_t v3 = XNN_INVALID_VALUE_ID; + std::array v3_dims = {{1, 56, 56, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v3_dims.size(), v3_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v3); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v3" << std::endl; + return nullptr; + } + + uint32_t v4 = XNN_INVALID_VALUE_ID; + std::array v4_dims = {{1, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v4_dims.size(), v4_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v4); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v4" << std::endl; + return nullptr; + } + + uint32_t v5 = XNN_INVALID_VALUE_ID; + std::array v5_dims = {{1, 1, 1, 8}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v5_dims.size(), v5_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v5); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v5" << std::endl; + return nullptr; + } + + uint32_t v6 = XNN_INVALID_VALUE_ID; + std::array v6_dims = {{1, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v6_dims.size(), v6_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v6); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v6" << std::endl; + return nullptr; + } + + uint32_t v7 = XNN_INVALID_VALUE_ID; + std::array v7_dims = {{1, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v7_dims.size(), v7_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v7); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v7" << std::endl; + return nullptr; + } + + uint32_t v8 = XNN_INVALID_VALUE_ID; + std::array v8_dims = {{1, 56, 56, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v8_dims.size(), v8_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v8); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v8" << std::endl; + return nullptr; + } + + uint32_t v9 = XNN_INVALID_VALUE_ID; + std::array v9_dims = {{1, 56, 56, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v9_dims.size(), v9_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v9); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v9" << std::endl; + return nullptr; + } + + uint32_t v10 = XNN_INVALID_VALUE_ID; + std::array v10_dims = {{1, 56, 56, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v10_dims.size(), v10_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v10); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v10" << std::endl; + return nullptr; + } + + uint32_t v11 = XNN_INVALID_VALUE_ID; + std::array v11_dims = {{1, 28, 28, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v11_dims.size(), v11_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v11); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v11" << std::endl; + return nullptr; + } + + uint32_t v12 = XNN_INVALID_VALUE_ID; + std::array v12_dims = {{1, 28, 28, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v12_dims.size(), v12_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v12); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v12" << std::endl; + return nullptr; + } + + uint32_t v13 = XNN_INVALID_VALUE_ID; + std::array v13_dims = {{1, 28, 28, 88}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v13_dims.size(), v13_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v13); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v13" << std::endl; + return nullptr; + } + + uint32_t v14 = XNN_INVALID_VALUE_ID; + std::array v14_dims = {{1, 28, 28, 88}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v14_dims.size(), v14_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v14); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v14" << std::endl; + return nullptr; + } + + uint32_t v15 = XNN_INVALID_VALUE_ID; + std::array v15_dims = {{1, 28, 28, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v15_dims.size(), v15_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v15); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v15" << std::endl; + return nullptr; + } + + uint32_t v16 = XNN_INVALID_VALUE_ID; + std::array v16_dims = {{1, 28, 28, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v16_dims.size(), v16_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v16); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v16" << std::endl; + return nullptr; + } + + uint32_t v17 = XNN_INVALID_VALUE_ID; + std::array v17_dims = {{1, 28, 28, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v17_dims.size(), v17_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v17); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v17" << std::endl; + return nullptr; + } + + uint32_t v18 = XNN_INVALID_VALUE_ID; + std::array v18_dims = {{1, 28, 28, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v18_dims.size(), v18_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v18); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v18" << std::endl; + return nullptr; + } + + uint32_t v19 = XNN_INVALID_VALUE_ID; + std::array v19_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v19_dims.size(), v19_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v19); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v19" << std::endl; + return nullptr; + } + + uint32_t v20 = XNN_INVALID_VALUE_ID; + std::array v20_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v20_dims.size(), v20_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v20); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v20" << std::endl; + return nullptr; + } + + uint32_t v21 = XNN_INVALID_VALUE_ID; + std::array v21_dims = {{1, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v21_dims.size(), v21_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v21); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v21" << std::endl; + return nullptr; + } + + uint32_t v22 = XNN_INVALID_VALUE_ID; + std::array v22_dims = {{1, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v22_dims.size(), v22_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v22); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v22" << std::endl; + return nullptr; + } + + uint32_t v23 = XNN_INVALID_VALUE_ID; + std::array v23_dims = {{1, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v23_dims.size(), v23_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v23); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v23" << std::endl; + return nullptr; + } + + uint32_t v24 = XNN_INVALID_VALUE_ID; + std::array v24_dims = {{1, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v24_dims.size(), v24_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v24); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v24" << std::endl; + return nullptr; + } + + uint32_t v25 = XNN_INVALID_VALUE_ID; + std::array v25_dims = {{1, 14, 14, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v25_dims.size(), v25_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v25); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v25" << std::endl; + return nullptr; + } + + uint32_t v26 = XNN_INVALID_VALUE_ID; + std::array v26_dims = {{1, 14, 14, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v26_dims.size(), v26_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v26); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v26" << std::endl; + return nullptr; + } + + uint32_t v27 = XNN_INVALID_VALUE_ID; + std::array v27_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v27_dims.size(), v27_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v27); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v27" << std::endl; + return nullptr; + } + + uint32_t v28 = XNN_INVALID_VALUE_ID; + std::array v28_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v28_dims.size(), v28_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v28); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v28" << std::endl; + return nullptr; + } + + uint32_t v29 = XNN_INVALID_VALUE_ID; + std::array v29_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v29_dims.size(), v29_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v29); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v29" << std::endl; + return nullptr; + } + + uint32_t v30 = XNN_INVALID_VALUE_ID; + std::array v30_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v30_dims.size(), v30_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v30); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v30" << std::endl; + return nullptr; + } + + uint32_t v31 = XNN_INVALID_VALUE_ID; + std::array v31_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v31_dims.size(), v31_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v31); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v31" << std::endl; + return nullptr; + } + + uint32_t v32 = XNN_INVALID_VALUE_ID; + std::array v32_dims = {{1, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v32_dims.size(), v32_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v32); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v32" << std::endl; + return nullptr; + } + + uint32_t v33 = XNN_INVALID_VALUE_ID; + std::array v33_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v33_dims.size(), v33_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v33); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v33" << std::endl; + return nullptr; + } + + uint32_t v34 = XNN_INVALID_VALUE_ID; + std::array v34_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v34_dims.size(), v34_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v34); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v34" << std::endl; + return nullptr; + } + + uint32_t v35 = XNN_INVALID_VALUE_ID; + std::array v35_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v35_dims.size(), v35_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v35); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v35" << std::endl; + return nullptr; + } + + uint32_t v36 = XNN_INVALID_VALUE_ID; + std::array v36_dims = {{1, 14, 14, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v36_dims.size(), v36_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v36); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v36" << std::endl; + return nullptr; + } + + uint32_t v37 = XNN_INVALID_VALUE_ID; + std::array v37_dims = {{1, 14, 14, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v37_dims.size(), v37_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v37); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v37" << std::endl; + return nullptr; + } + + uint32_t v38 = XNN_INVALID_VALUE_ID; + std::array v38_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v38_dims.size(), v38_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v38); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v38" << std::endl; + return nullptr; + } + + uint32_t v39 = XNN_INVALID_VALUE_ID; + std::array v39_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v39_dims.size(), v39_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v39); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v39" << std::endl; + return nullptr; + } + + uint32_t v40 = XNN_INVALID_VALUE_ID; + std::array v40_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v40_dims.size(), v40_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v40); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v40" << std::endl; + return nullptr; + } + + uint32_t v41 = XNN_INVALID_VALUE_ID; + std::array v41_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v41_dims.size(), v41_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v41); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v41" << std::endl; + return nullptr; + } + + uint32_t v42 = XNN_INVALID_VALUE_ID; + std::array v42_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v42_dims.size(), v42_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v42); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v42" << std::endl; + return nullptr; + } + + uint32_t v43 = XNN_INVALID_VALUE_ID; + std::array v43_dims = {{1, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v43_dims.size(), v43_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v43); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v43" << std::endl; + return nullptr; + } + + uint32_t v44 = XNN_INVALID_VALUE_ID; + std::array v44_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v44_dims.size(), v44_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v44); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v44" << std::endl; + return nullptr; + } + + uint32_t v45 = XNN_INVALID_VALUE_ID; + std::array v45_dims = {{1, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v45_dims.size(), v45_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v45); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v45" << std::endl; + return nullptr; + } + + uint32_t v46 = XNN_INVALID_VALUE_ID; + std::array v46_dims = {{1, 14, 14, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v46_dims.size(), v46_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v46); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v46" << std::endl; + return nullptr; + } + + uint32_t v47 = XNN_INVALID_VALUE_ID; + std::array v47_dims = {{1, 14, 14, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v47_dims.size(), v47_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v47); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v47" << std::endl; + return nullptr; + } + + uint32_t v48 = XNN_INVALID_VALUE_ID; + std::array v48_dims = {{1, 14, 14, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v48_dims.size(), v48_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v48); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v48" << std::endl; + return nullptr; + } + + uint32_t v49 = XNN_INVALID_VALUE_ID; + std::array v49_dims = {{1, 14, 14, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v49_dims.size(), v49_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v49); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v49" << std::endl; + return nullptr; + } + + uint32_t v50 = XNN_INVALID_VALUE_ID; + std::array v50_dims = {{1, 14, 14, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v50_dims.size(), v50_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v50); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v50" << std::endl; + return nullptr; + } + + uint32_t v51 = XNN_INVALID_VALUE_ID; + std::array v51_dims = {{1, 14, 14, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v51_dims.size(), v51_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v51); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v51" << std::endl; + return nullptr; + } + + uint32_t v52 = XNN_INVALID_VALUE_ID; + std::array v52_dims = {{1, 14, 14, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v52_dims.size(), v52_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v52); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v52" << std::endl; + return nullptr; + } + + uint32_t v53 = XNN_INVALID_VALUE_ID; + std::array v53_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v53_dims.size(), v53_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v53); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v53" << std::endl; + return nullptr; + } + + uint32_t v54 = XNN_INVALID_VALUE_ID; + std::array v54_dims = {{1, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v54_dims.size(), v54_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v54); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v54" << std::endl; + return nullptr; + } + + uint32_t v55 = XNN_INVALID_VALUE_ID; + std::array v55_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v55_dims.size(), v55_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v55); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v55" << std::endl; + return nullptr; + } + + uint32_t v56 = XNN_INVALID_VALUE_ID; + std::array v56_dims = {{1, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v56_dims.size(), v56_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v56); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v56" << std::endl; + return nullptr; + } + + uint32_t v57 = XNN_INVALID_VALUE_ID; + std::array v57_dims = {{1, 14, 14, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v57_dims.size(), v57_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v57); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v57" << std::endl; + return nullptr; + } + + uint32_t v58 = XNN_INVALID_VALUE_ID; + std::array v58_dims = {{1, 14, 14, 48}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v58_dims.size(), v58_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v58); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v58" << std::endl; + return nullptr; + } + + uint32_t v59 = XNN_INVALID_VALUE_ID; + std::array v59_dims = {{1, 14, 14, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v59_dims.size(), v59_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v59); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v59" << std::endl; + return nullptr; + } + + uint32_t v60 = XNN_INVALID_VALUE_ID; + std::array v60_dims = {{1, 14, 14, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v60_dims.size(), v60_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v60); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v60" << std::endl; + return nullptr; + } + + uint32_t v61 = XNN_INVALID_VALUE_ID; + std::array v61_dims = {{1, 14, 14, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v61_dims.size(), v61_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v61); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v61" << std::endl; + return nullptr; + } + + uint32_t v62 = XNN_INVALID_VALUE_ID; + std::array v62_dims = {{1, 14, 14, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v62_dims.size(), v62_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v62); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v62" << std::endl; + return nullptr; + } + + uint32_t v63 = XNN_INVALID_VALUE_ID; + std::array v63_dims = {{1, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v63_dims.size(), v63_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v63); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v63" << std::endl; + return nullptr; + } + + uint32_t v64 = XNN_INVALID_VALUE_ID; + std::array v64_dims = {{1, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v64_dims.size(), v64_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v64); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v64" << std::endl; + return nullptr; + } + + uint32_t v65 = XNN_INVALID_VALUE_ID; + std::array v65_dims = {{1, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v65_dims.size(), v65_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v65); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v65" << std::endl; + return nullptr; + } + + uint32_t v66 = XNN_INVALID_VALUE_ID; + std::array v66_dims = {{1, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v66_dims.size(), v66_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v66); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v66" << std::endl; + return nullptr; + } + + uint32_t v67 = XNN_INVALID_VALUE_ID; + std::array v67_dims = {{1, 14, 14, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v67_dims.size(), v67_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v67); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v67" << std::endl; + return nullptr; + } + + uint32_t v68 = XNN_INVALID_VALUE_ID; + std::array v68_dims = {{1, 14, 14, 48}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v68_dims.size(), v68_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v68); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v68" << std::endl; + return nullptr; + } + + uint32_t v69 = XNN_INVALID_VALUE_ID; + std::array v69_dims = {{1, 14, 14, 48}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v69_dims.size(), v69_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v69); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v69" << std::endl; + return nullptr; + } + + uint32_t v70 = XNN_INVALID_VALUE_ID; + std::array v70_dims = {{1, 14, 14, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v70_dims.size(), v70_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v70); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v70" << std::endl; + return nullptr; + } + + uint32_t v71 = XNN_INVALID_VALUE_ID; + std::array v71_dims = {{1, 14, 14, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v71_dims.size(), v71_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v71); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v71" << std::endl; + return nullptr; + } + + uint32_t v72 = XNN_INVALID_VALUE_ID; + std::array v72_dims = {{1, 7, 7, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v72_dims.size(), v72_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v72); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v72" << std::endl; + return nullptr; + } + + uint32_t v73 = XNN_INVALID_VALUE_ID; + std::array v73_dims = {{1, 7, 7, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v73_dims.size(), v73_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v73); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v73" << std::endl; + return nullptr; + } + + uint32_t v74 = XNN_INVALID_VALUE_ID; + std::array v74_dims = {{1, 1, 1, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v74_dims.size(), v74_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v74); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v74" << std::endl; + return nullptr; + } + + uint32_t v75 = XNN_INVALID_VALUE_ID; + std::array v75_dims = {{1, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v75_dims.size(), v75_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v75); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v75" << std::endl; + return nullptr; + } + + uint32_t v76 = XNN_INVALID_VALUE_ID; + std::array v76_dims = {{1, 1, 1, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v76_dims.size(), v76_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v76); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v76" << std::endl; + return nullptr; + } + + uint32_t v77 = XNN_INVALID_VALUE_ID; + std::array v77_dims = {{1, 1, 1, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v77_dims.size(), v77_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v77); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v77" << std::endl; + return nullptr; + } + + uint32_t v78 = XNN_INVALID_VALUE_ID; + std::array v78_dims = {{1, 7, 7, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v78_dims.size(), v78_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v78); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v78" << std::endl; + return nullptr; + } + + uint32_t v79 = XNN_INVALID_VALUE_ID; + std::array v79_dims = {{1, 7, 7, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v79_dims.size(), v79_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v79); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v79" << std::endl; + return nullptr; + } + + uint32_t v80 = XNN_INVALID_VALUE_ID; + std::array v80_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v80_dims.size(), v80_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v80); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v80" << std::endl; + return nullptr; + } + + uint32_t v81 = XNN_INVALID_VALUE_ID; + std::array v81_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v81_dims.size(), v81_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v81); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v81" << std::endl; + return nullptr; + } + + uint32_t v82 = XNN_INVALID_VALUE_ID; + std::array v82_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v82_dims.size(), v82_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v82); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v82" << std::endl; + return nullptr; + } + + uint32_t v83 = XNN_INVALID_VALUE_ID; + std::array v83_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v83_dims.size(), v83_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v83); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v83" << std::endl; + return nullptr; + } + + uint32_t v84 = XNN_INVALID_VALUE_ID; + std::array v84_dims = {{1, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v84_dims.size(), v84_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v84); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v84" << std::endl; + return nullptr; + } + + uint32_t v85 = XNN_INVALID_VALUE_ID; + std::array v85_dims = {{1, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v85_dims.size(), v85_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v85); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v85" << std::endl; + return nullptr; + } + + uint32_t v86 = XNN_INVALID_VALUE_ID; + std::array v86_dims = {{1, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v86_dims.size(), v86_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v86); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v86" << std::endl; + return nullptr; + } + + uint32_t v87 = XNN_INVALID_VALUE_ID; + std::array v87_dims = {{1, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v87_dims.size(), v87_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v87); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v87" << std::endl; + return nullptr; + } + + uint32_t v88 = XNN_INVALID_VALUE_ID; + std::array v88_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v88_dims.size(), v88_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v88); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v88" << std::endl; + return nullptr; + } + + uint32_t v89 = XNN_INVALID_VALUE_ID; + std::array v89_dims = {{1, 7, 7, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v89_dims.size(), v89_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v89); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v89" << std::endl; + return nullptr; + } + + uint32_t v90 = XNN_INVALID_VALUE_ID; + std::array v90_dims = {{1, 7, 7, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v90_dims.size(), v90_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v90); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v90" << std::endl; + return nullptr; + } + + uint32_t v91 = XNN_INVALID_VALUE_ID; + std::array v91_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v91_dims.size(), v91_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v91); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v91" << std::endl; + return nullptr; + } + + uint32_t v92 = XNN_INVALID_VALUE_ID; + std::array v92_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v92_dims.size(), v92_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v92); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v92" << std::endl; + return nullptr; + } + + uint32_t v93 = XNN_INVALID_VALUE_ID; + std::array v93_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v93_dims.size(), v93_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v93); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v93" << std::endl; + return nullptr; + } + + uint32_t v94 = XNN_INVALID_VALUE_ID; + std::array v94_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v94_dims.size(), v94_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v94); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v94" << std::endl; + return nullptr; + } + + uint32_t v95 = XNN_INVALID_VALUE_ID; + std::array v95_dims = {{1, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v95_dims.size(), v95_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v95); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v95" << std::endl; + return nullptr; + } + + uint32_t v96 = XNN_INVALID_VALUE_ID; + std::array v96_dims = {{1, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v96_dims.size(), v96_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v96); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v96" << std::endl; + return nullptr; + } + + uint32_t v97 = XNN_INVALID_VALUE_ID; + std::array v97_dims = {{1, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v97_dims.size(), v97_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v97); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v97" << std::endl; + return nullptr; + } + + uint32_t v98 = XNN_INVALID_VALUE_ID; + std::array v98_dims = {{1, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v98_dims.size(), v98_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v98); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v98" << std::endl; + return nullptr; + } + + uint32_t v99 = XNN_INVALID_VALUE_ID; + std::array v99_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v99_dims.size(), v99_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v99); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v99" << std::endl; + return nullptr; + } + + uint32_t v100 = XNN_INVALID_VALUE_ID; + std::array v100_dims = {{1, 7, 7, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v100_dims.size(), v100_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v100); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v100" << std::endl; + return nullptr; + } + + uint32_t v101 = XNN_INVALID_VALUE_ID; + std::array v101_dims = {{1, 7, 7, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v101_dims.size(), v101_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v101); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v101" << std::endl; + return nullptr; + } + + uint32_t v102 = XNN_INVALID_VALUE_ID; + std::array v102_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v102_dims.size(), v102_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v102); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v102" << std::endl; + return nullptr; + } + + uint32_t v103 = XNN_INVALID_VALUE_ID; + std::array v103_dims = {{1, 7, 7, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v103_dims.size(), v103_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v103); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v103" << std::endl; + return nullptr; + } + + uint32_t v104 = XNN_INVALID_VALUE_ID; + std::array v104_dims = {{1, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v104_dims.size(), v104_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v104); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v104" << std::endl; + return nullptr; + } + + uint32_t v105 = XNN_INVALID_VALUE_ID; + std::array v105_dims = {{1, 1, 1, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v105_dims.size(), v105_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v105); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v105" << std::endl; + return nullptr; + } + + uint32_t v106 = XNN_INVALID_VALUE_ID; + std::array v106_dims = {{1, 1, 1, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v106_dims.size(), v106_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v106); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v106" << std::endl; + return nullptr; + } + + uint32_t v107 = XNN_INVALID_VALUE_ID; + std::array v107_dims = {{1, 1, 1, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v107_dims.size(), v107_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v107); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v107" << std::endl; + return nullptr; + } + + uint32_t v108 = XNN_INVALID_VALUE_ID; + std::array v108_dims = {{1, 1, 1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v108_dims.size(), v108_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v108); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v108" << std::endl; + return nullptr; + } + + uint32_t v109 = XNN_INVALID_VALUE_ID; + std::array v109_dims = {{1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v109_dims.size(), v109_dims.data(), + /*data=*/nullptr, XNN_INVALID_VALUE_ID, /*flags=*/0, &v109); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v109" << std::endl; + return nullptr; + } + + uint32_t v110 = XNN_INVALID_VALUE_ID; + std::array v110_dims = {{1, 1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, v110_dims.size(), v110_dims.data(), + /*data=*/nullptr, 1, XNN_VALUE_FLAG_EXTERNAL_OUTPUT, &v110); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor v110" << std::endl; + return nullptr; + } + + static std::vector w111_data; + w111_data.resize(XNN_PAD_EXTRA_BYTES(432, float)); + uint32_t w111 = XNN_INVALID_VALUE_ID; + std::array w111_dims = {{16, 3, 3, 3}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w111_dims.size(), w111_dims.data(), + /*data=*/w111_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w111); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w111" << std::endl; + return nullptr; + } + + static std::vector w112_data; + w112_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w112 = XNN_INVALID_VALUE_ID; + std::array w112_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w112_dims.size(), w112_dims.data(), + /*data=*/w112_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w112); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w112" << std::endl; + return nullptr; + } + + static std::vector w113_data; + w113_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w113 = XNN_INVALID_VALUE_ID; + std::array w113_dims = {{1, 3, 3, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w113_dims.size(), w113_dims.data(), + /*data=*/w113_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w113); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w113" << std::endl; + return nullptr; + } + + static std::vector w114_data; + w114_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w114 = XNN_INVALID_VALUE_ID; + std::array w114_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w114_dims.size(), w114_dims.data(), + /*data=*/w114_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w114); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w114" << std::endl; + return nullptr; + } + + static std::vector w115_data; + w115_data.resize(XNN_PAD_EXTRA_BYTES(128, float)); + uint32_t w115 = XNN_INVALID_VALUE_ID; + std::array w115_dims = {{8, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w115_dims.size(), w115_dims.data(), + /*data=*/w115_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w115); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w115" << std::endl; + return nullptr; + } + + static std::vector w116_data; + w116_data.resize(XNN_PAD_EXTRA_BYTES(8, float)); + uint32_t w116 = XNN_INVALID_VALUE_ID; + std::array w116_dims = {{8}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w116_dims.size(), w116_dims.data(), + /*data=*/w116_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w116); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w116" << std::endl; + return nullptr; + } + + static std::vector w117_data; + w117_data.resize(XNN_PAD_EXTRA_BYTES(128, float)); + uint32_t w117 = XNN_INVALID_VALUE_ID; + std::array w117_dims = {{16, 1, 1, 8}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w117_dims.size(), w117_dims.data(), + /*data=*/w117_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w117); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w117" << std::endl; + return nullptr; + } + + static std::vector w118_data; + w118_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w118 = XNN_INVALID_VALUE_ID; + std::array w118_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w118_dims.size(), w118_dims.data(), + /*data=*/w118_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w118); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w118" << std::endl; + return nullptr; + } + + static std::vector w119_data; + w119_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w119 = XNN_INVALID_VALUE_ID; + std::array w119_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w119_dims.size(), w119_dims.data(), + /*data=*/w119_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w119); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w119" << std::endl; + return nullptr; + } + + static std::vector w120_data; + w120_data.resize(XNN_PAD_EXTRA_BYTES(256, float)); + uint32_t w120 = XNN_INVALID_VALUE_ID; + std::array w120_dims = {{16, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w120_dims.size(), w120_dims.data(), + /*data=*/w120_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w120); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w120" << std::endl; + return nullptr; + } + + static std::vector w121_data; + w121_data.resize(XNN_PAD_EXTRA_BYTES(16, float)); + uint32_t w121 = XNN_INVALID_VALUE_ID; + std::array w121_dims = {{16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w121_dims.size(), w121_dims.data(), + /*data=*/w121_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w121); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w121" << std::endl; + return nullptr; + } + + static std::vector w122_data; + w122_data.resize(XNN_PAD_EXTRA_BYTES(1152, float)); + uint32_t w122 = XNN_INVALID_VALUE_ID; + std::array w122_dims = {{72, 1, 1, 16}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w122_dims.size(), w122_dims.data(), + /*data=*/w122_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w122); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w122" << std::endl; + return nullptr; + } + + static std::vector w123_data; + w123_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w123 = XNN_INVALID_VALUE_ID; + std::array w123_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w123_dims.size(), w123_dims.data(), + /*data=*/w123_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w123); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w123" << std::endl; + return nullptr; + } + + static std::vector w124_data; + w124_data.resize(XNN_PAD_EXTRA_BYTES(648, float)); + uint32_t w124 = XNN_INVALID_VALUE_ID; + std::array w124_dims = {{1, 3, 3, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w124_dims.size(), w124_dims.data(), + /*data=*/w124_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w124); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w124" << std::endl; + return nullptr; + } + + static std::vector w125_data; + w125_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w125 = XNN_INVALID_VALUE_ID; + std::array w125_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w125_dims.size(), w125_dims.data(), + /*data=*/w125_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w125); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w125" << std::endl; + return nullptr; + } + + static std::vector w126_data; + w126_data.resize(XNN_PAD_EXTRA_BYTES(1728, float)); + uint32_t w126 = XNN_INVALID_VALUE_ID; + std::array w126_dims = {{24, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w126_dims.size(), w126_dims.data(), + /*data=*/w126_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w126); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w126" << std::endl; + return nullptr; + } + + static std::vector w127_data; + w127_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w127 = XNN_INVALID_VALUE_ID; + std::array w127_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w127_dims.size(), w127_dims.data(), + /*data=*/w127_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w127); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w127" << std::endl; + return nullptr; + } + + static std::vector w128_data; + w128_data.resize(XNN_PAD_EXTRA_BYTES(2112, float)); + uint32_t w128 = XNN_INVALID_VALUE_ID; + std::array w128_dims = {{88, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w128_dims.size(), w128_dims.data(), + /*data=*/w128_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w128); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w128" << std::endl; + return nullptr; + } + + static std::vector w129_data; + w129_data.resize(XNN_PAD_EXTRA_BYTES(88, float)); + uint32_t w129 = XNN_INVALID_VALUE_ID; + std::array w129_dims = {{88}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w129_dims.size(), w129_dims.data(), + /*data=*/w129_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w129); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w129" << std::endl; + return nullptr; + } + + static std::vector w130_data; + w130_data.resize(XNN_PAD_EXTRA_BYTES(792, float)); + uint32_t w130 = XNN_INVALID_VALUE_ID; + std::array w130_dims = {{1, 3, 3, 88}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w130_dims.size(), w130_dims.data(), + /*data=*/w130_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w130); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w130" << std::endl; + return nullptr; + } + + static std::vector w131_data; + w131_data.resize(XNN_PAD_EXTRA_BYTES(88, float)); + uint32_t w131 = XNN_INVALID_VALUE_ID; + std::array w131_dims = {{88}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w131_dims.size(), w131_dims.data(), + /*data=*/w131_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w131); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w131" << std::endl; + return nullptr; + } + + static std::vector w132_data; + w132_data.resize(XNN_PAD_EXTRA_BYTES(2112, float)); + uint32_t w132 = XNN_INVALID_VALUE_ID; + std::array w132_dims = {{24, 1, 1, 88}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w132_dims.size(), w132_dims.data(), + /*data=*/w132_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w132); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w132" << std::endl; + return nullptr; + } + + static std::vector w133_data; + w133_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w133 = XNN_INVALID_VALUE_ID; + std::array w133_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w133_dims.size(), w133_dims.data(), + /*data=*/w133_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w133); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w133" << std::endl; + return nullptr; + } + + static std::vector w134_data; + w134_data.resize(XNN_PAD_EXTRA_BYTES(2304, float)); + uint32_t w134 = XNN_INVALID_VALUE_ID; + std::array w134_dims = {{96, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w134_dims.size(), w134_dims.data(), + /*data=*/w134_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w134); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w134" << std::endl; + return nullptr; + } + + static std::vector w135_data; + w135_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w135 = XNN_INVALID_VALUE_ID; + std::array w135_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w135_dims.size(), w135_dims.data(), + /*data=*/w135_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w135); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w135" << std::endl; + return nullptr; + } + + static std::vector w136_data; + w136_data.resize(XNN_PAD_EXTRA_BYTES(2400, float)); + uint32_t w136 = XNN_INVALID_VALUE_ID; + std::array w136_dims = {{1, 5, 5, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w136_dims.size(), w136_dims.data(), + /*data=*/w136_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w136); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w136" << std::endl; + return nullptr; + } + + static std::vector w137_data; + w137_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w137 = XNN_INVALID_VALUE_ID; + std::array w137_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w137_dims.size(), w137_dims.data(), + /*data=*/w137_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w137); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w137" << std::endl; + return nullptr; + } + + static std::vector w138_data; + w138_data.resize(XNN_PAD_EXTRA_BYTES(2304, float)); + uint32_t w138 = XNN_INVALID_VALUE_ID; + std::array w138_dims = {{24, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w138_dims.size(), w138_dims.data(), + /*data=*/w138_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w138); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w138" << std::endl; + return nullptr; + } + + static std::vector w139_data; + w139_data.resize(XNN_PAD_EXTRA_BYTES(24, float)); + uint32_t w139 = XNN_INVALID_VALUE_ID; + std::array w139_dims = {{24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w139_dims.size(), w139_dims.data(), + /*data=*/w139_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w139); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w139" << std::endl; + return nullptr; + } + + static std::vector w140_data; + w140_data.resize(XNN_PAD_EXTRA_BYTES(2304, float)); + uint32_t w140 = XNN_INVALID_VALUE_ID; + std::array w140_dims = {{96, 1, 1, 24}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w140_dims.size(), w140_dims.data(), + /*data=*/w140_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w140); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w140" << std::endl; + return nullptr; + } + + static std::vector w141_data; + w141_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w141 = XNN_INVALID_VALUE_ID; + std::array w141_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w141_dims.size(), w141_dims.data(), + /*data=*/w141_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w141); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w141" << std::endl; + return nullptr; + } + + static std::vector w142_data; + w142_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w142 = XNN_INVALID_VALUE_ID; + std::array w142_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w142_dims.size(), w142_dims.data(), + /*data=*/w142_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w142); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w142" << std::endl; + return nullptr; + } + + static std::vector w143_data; + w143_data.resize(XNN_PAD_EXTRA_BYTES(3840, float)); + uint32_t w143 = XNN_INVALID_VALUE_ID; + std::array w143_dims = {{40, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w143_dims.size(), w143_dims.data(), + /*data=*/w143_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w143); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w143" << std::endl; + return nullptr; + } + + static std::vector w144_data; + w144_data.resize(XNN_PAD_EXTRA_BYTES(40, float)); + uint32_t w144 = XNN_INVALID_VALUE_ID; + std::array w144_dims = {{40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w144_dims.size(), w144_dims.data(), + /*data=*/w144_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w144); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w144" << std::endl; + return nullptr; + } + + static std::vector w145_data; + w145_data.resize(XNN_PAD_EXTRA_BYTES(9600, float)); + uint32_t w145 = XNN_INVALID_VALUE_ID; + std::array w145_dims = {{240, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w145_dims.size(), w145_dims.data(), + /*data=*/w145_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w145); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w145" << std::endl; + return nullptr; + } + + static std::vector w146_data; + w146_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w146 = XNN_INVALID_VALUE_ID; + std::array w146_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w146_dims.size(), w146_dims.data(), + /*data=*/w146_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w146); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w146" << std::endl; + return nullptr; + } + + static std::vector w147_data; + w147_data.resize(XNN_PAD_EXTRA_BYTES(6000, float)); + uint32_t w147 = XNN_INVALID_VALUE_ID; + std::array w147_dims = {{1, 5, 5, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w147_dims.size(), w147_dims.data(), + /*data=*/w147_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w147); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w147" << std::endl; + return nullptr; + } + + static std::vector w148_data; + w148_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w148 = XNN_INVALID_VALUE_ID; + std::array w148_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w148_dims.size(), w148_dims.data(), + /*data=*/w148_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w148); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w148" << std::endl; + return nullptr; + } + + static std::vector w149_data; + w149_data.resize(XNN_PAD_EXTRA_BYTES(15360, float)); + uint32_t w149 = XNN_INVALID_VALUE_ID; + std::array w149_dims = {{64, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w149_dims.size(), w149_dims.data(), + /*data=*/w149_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w149); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w149" << std::endl; + return nullptr; + } + + static std::vector w150_data; + w150_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w150 = XNN_INVALID_VALUE_ID; + std::array w150_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w150_dims.size(), w150_dims.data(), + /*data=*/w150_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w150); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w150" << std::endl; + return nullptr; + } + + static std::vector w151_data; + w151_data.resize(XNN_PAD_EXTRA_BYTES(15360, float)); + uint32_t w151 = XNN_INVALID_VALUE_ID; + std::array w151_dims = {{240, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w151_dims.size(), w151_dims.data(), + /*data=*/w151_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w151); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w151" << std::endl; + return nullptr; + } + + static std::vector w152_data; + w152_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w152 = XNN_INVALID_VALUE_ID; + std::array w152_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w152_dims.size(), w152_dims.data(), + /*data=*/w152_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w152); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w152" << std::endl; + return nullptr; + } + + static std::vector w153_data; + w153_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w153 = XNN_INVALID_VALUE_ID; + std::array w153_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w153_dims.size(), w153_dims.data(), + /*data=*/w153_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w153); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w153" << std::endl; + return nullptr; + } + + static std::vector w154_data; + w154_data.resize(XNN_PAD_EXTRA_BYTES(9600, float)); + uint32_t w154 = XNN_INVALID_VALUE_ID; + std::array w154_dims = {{40, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w154_dims.size(), w154_dims.data(), + /*data=*/w154_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w154); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w154" << std::endl; + return nullptr; + } + + static std::vector w155_data; + w155_data.resize(XNN_PAD_EXTRA_BYTES(40, float)); + uint32_t w155 = XNN_INVALID_VALUE_ID; + std::array w155_dims = {{40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w155_dims.size(), w155_dims.data(), + /*data=*/w155_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w155); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w155" << std::endl; + return nullptr; + } + + static std::vector w156_data; + w156_data.resize(XNN_PAD_EXTRA_BYTES(9600, float)); + uint32_t w156 = XNN_INVALID_VALUE_ID; + std::array w156_dims = {{240, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w156_dims.size(), w156_dims.data(), + /*data=*/w156_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w156); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w156" << std::endl; + return nullptr; + } + + static std::vector w157_data; + w157_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w157 = XNN_INVALID_VALUE_ID; + std::array w157_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w157_dims.size(), w157_dims.data(), + /*data=*/w157_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w157); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w157" << std::endl; + return nullptr; + } + + static std::vector w158_data; + w158_data.resize(XNN_PAD_EXTRA_BYTES(6000, float)); + uint32_t w158 = XNN_INVALID_VALUE_ID; + std::array w158_dims = {{1, 5, 5, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w158_dims.size(), w158_dims.data(), + /*data=*/w158_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w158); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w158" << std::endl; + return nullptr; + } + + static std::vector w159_data; + w159_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w159 = XNN_INVALID_VALUE_ID; + std::array w159_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w159_dims.size(), w159_dims.data(), + /*data=*/w159_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w159); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w159" << std::endl; + return nullptr; + } + + static std::vector w160_data; + w160_data.resize(XNN_PAD_EXTRA_BYTES(15360, float)); + uint32_t w160 = XNN_INVALID_VALUE_ID; + std::array w160_dims = {{64, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w160_dims.size(), w160_dims.data(), + /*data=*/w160_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w160); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w160" << std::endl; + return nullptr; + } + + static std::vector w161_data; + w161_data.resize(XNN_PAD_EXTRA_BYTES(64, float)); + uint32_t w161 = XNN_INVALID_VALUE_ID; + std::array w161_dims = {{64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w161_dims.size(), w161_dims.data(), + /*data=*/w161_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w161); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w161" << std::endl; + return nullptr; + } + + static std::vector w162_data; + w162_data.resize(XNN_PAD_EXTRA_BYTES(15360, float)); + uint32_t w162 = XNN_INVALID_VALUE_ID; + std::array w162_dims = {{240, 1, 1, 64}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w162_dims.size(), w162_dims.data(), + /*data=*/w162_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w162); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w162" << std::endl; + return nullptr; + } + + static std::vector w163_data; + w163_data.resize(XNN_PAD_EXTRA_BYTES(240, float)); + uint32_t w163 = XNN_INVALID_VALUE_ID; + std::array w163_dims = {{240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w163_dims.size(), w163_dims.data(), + /*data=*/w163_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w163); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w163" << std::endl; + return nullptr; + } + + static std::vector w164_data; + w164_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w164 = XNN_INVALID_VALUE_ID; + std::array w164_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w164_dims.size(), w164_dims.data(), + /*data=*/w164_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w164); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w164" << std::endl; + return nullptr; + } + + static std::vector w165_data; + w165_data.resize(XNN_PAD_EXTRA_BYTES(9600, float)); + uint32_t w165 = XNN_INVALID_VALUE_ID; + std::array w165_dims = {{40, 1, 1, 240}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w165_dims.size(), w165_dims.data(), + /*data=*/w165_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w165); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w165" << std::endl; + return nullptr; + } + + static std::vector w166_data; + w166_data.resize(XNN_PAD_EXTRA_BYTES(40, float)); + uint32_t w166 = XNN_INVALID_VALUE_ID; + std::array w166_dims = {{40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w166_dims.size(), w166_dims.data(), + /*data=*/w166_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w166); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w166" << std::endl; + return nullptr; + } + + static std::vector w167_data; + w167_data.resize(XNN_PAD_EXTRA_BYTES(4800, float)); + uint32_t w167 = XNN_INVALID_VALUE_ID; + std::array w167_dims = {{120, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w167_dims.size(), w167_dims.data(), + /*data=*/w167_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w167); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w167" << std::endl; + return nullptr; + } + + static std::vector w168_data; + w168_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w168 = XNN_INVALID_VALUE_ID; + std::array w168_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w168_dims.size(), w168_dims.data(), + /*data=*/w168_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w168); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w168" << std::endl; + return nullptr; + } + + static std::vector w169_data; + w169_data.resize(XNN_PAD_EXTRA_BYTES(3000, float)); + uint32_t w169 = XNN_INVALID_VALUE_ID; + std::array w169_dims = {{1, 5, 5, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w169_dims.size(), w169_dims.data(), + /*data=*/w169_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w169); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w169" << std::endl; + return nullptr; + } + + static std::vector w170_data; + w170_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w170 = XNN_INVALID_VALUE_ID; + std::array w170_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w170_dims.size(), w170_dims.data(), + /*data=*/w170_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w170); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w170" << std::endl; + return nullptr; + } + + static std::vector w171_data; + w171_data.resize(XNN_PAD_EXTRA_BYTES(3840, float)); + uint32_t w171 = XNN_INVALID_VALUE_ID; + std::array w171_dims = {{32, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w171_dims.size(), w171_dims.data(), + /*data=*/w171_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w171); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w171" << std::endl; + return nullptr; + } + + static std::vector w172_data; + w172_data.resize(XNN_PAD_EXTRA_BYTES(32, float)); + uint32_t w172 = XNN_INVALID_VALUE_ID; + std::array w172_dims = {{32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w172_dims.size(), w172_dims.data(), + /*data=*/w172_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w172); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w172" << std::endl; + return nullptr; + } + + static std::vector w173_data; + w173_data.resize(XNN_PAD_EXTRA_BYTES(3840, float)); + uint32_t w173 = XNN_INVALID_VALUE_ID; + std::array w173_dims = {{120, 1, 1, 32}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w173_dims.size(), w173_dims.data(), + /*data=*/w173_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w173); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w173" << std::endl; + return nullptr; + } + + static std::vector w174_data; + w174_data.resize(XNN_PAD_EXTRA_BYTES(120, float)); + uint32_t w174 = XNN_INVALID_VALUE_ID; + std::array w174_dims = {{120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w174_dims.size(), w174_dims.data(), + /*data=*/w174_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w174); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w174" << std::endl; + return nullptr; + } + + static std::vector w175_data; + w175_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w175 = XNN_INVALID_VALUE_ID; + std::array w175_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w175_dims.size(), w175_dims.data(), + /*data=*/w175_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w175); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w175" << std::endl; + return nullptr; + } + + static std::vector w176_data; + w176_data.resize(XNN_PAD_EXTRA_BYTES(5760, float)); + uint32_t w176 = XNN_INVALID_VALUE_ID; + std::array w176_dims = {{48, 1, 1, 120}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w176_dims.size(), w176_dims.data(), + /*data=*/w176_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w176); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w176" << std::endl; + return nullptr; + } + + static std::vector w177_data; + w177_data.resize(XNN_PAD_EXTRA_BYTES(48, float)); + uint32_t w177 = XNN_INVALID_VALUE_ID; + std::array w177_dims = {{48}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w177_dims.size(), w177_dims.data(), + /*data=*/w177_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w177); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w177" << std::endl; + return nullptr; + } + + static std::vector w178_data; + w178_data.resize(XNN_PAD_EXTRA_BYTES(6912, float)); + uint32_t w178 = XNN_INVALID_VALUE_ID; + std::array w178_dims = {{144, 1, 1, 48}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w178_dims.size(), w178_dims.data(), + /*data=*/w178_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w178); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w178" << std::endl; + return nullptr; + } + + static std::vector w179_data; + w179_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w179 = XNN_INVALID_VALUE_ID; + std::array w179_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w179_dims.size(), w179_dims.data(), + /*data=*/w179_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w179); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w179" << std::endl; + return nullptr; + } + + static std::vector w180_data; + w180_data.resize(XNN_PAD_EXTRA_BYTES(3600, float)); + uint32_t w180 = XNN_INVALID_VALUE_ID; + std::array w180_dims = {{1, 5, 5, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w180_dims.size(), w180_dims.data(), + /*data=*/w180_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w180); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w180" << std::endl; + return nullptr; + } + + static std::vector w181_data; + w181_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w181 = XNN_INVALID_VALUE_ID; + std::array w181_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w181_dims.size(), w181_dims.data(), + /*data=*/w181_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w181); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w181" << std::endl; + return nullptr; + } + + static std::vector w182_data; + w182_data.resize(XNN_PAD_EXTRA_BYTES(5760, float)); + uint32_t w182 = XNN_INVALID_VALUE_ID; + std::array w182_dims = {{40, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w182_dims.size(), w182_dims.data(), + /*data=*/w182_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w182); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w182" << std::endl; + return nullptr; + } + + static std::vector w183_data; + w183_data.resize(XNN_PAD_EXTRA_BYTES(40, float)); + uint32_t w183 = XNN_INVALID_VALUE_ID; + std::array w183_dims = {{40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w183_dims.size(), w183_dims.data(), + /*data=*/w183_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w183); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w183" << std::endl; + return nullptr; + } + + static std::vector w184_data; + w184_data.resize(XNN_PAD_EXTRA_BYTES(5760, float)); + uint32_t w184 = XNN_INVALID_VALUE_ID; + std::array w184_dims = {{144, 1, 1, 40}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w184_dims.size(), w184_dims.data(), + /*data=*/w184_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w184); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w184" << std::endl; + return nullptr; + } + + static std::vector w185_data; + w185_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w185 = XNN_INVALID_VALUE_ID; + std::array w185_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w185_dims.size(), w185_dims.data(), + /*data=*/w185_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w185); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w185" << std::endl; + return nullptr; + } + + static std::vector w186_data; + w186_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w186 = XNN_INVALID_VALUE_ID; + std::array w186_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w186_dims.size(), w186_dims.data(), + /*data=*/w186_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w186); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w186" << std::endl; + return nullptr; + } + + static std::vector w187_data; + w187_data.resize(XNN_PAD_EXTRA_BYTES(6912, float)); + uint32_t w187 = XNN_INVALID_VALUE_ID; + std::array w187_dims = {{48, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w187_dims.size(), w187_dims.data(), + /*data=*/w187_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w187); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w187" << std::endl; + return nullptr; + } + + static std::vector w188_data; + w188_data.resize(XNN_PAD_EXTRA_BYTES(48, float)); + uint32_t w188 = XNN_INVALID_VALUE_ID; + std::array w188_dims = {{48}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w188_dims.size(), w188_dims.data(), + /*data=*/w188_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w188); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w188" << std::endl; + return nullptr; + } + + static std::vector w189_data; + w189_data.resize(XNN_PAD_EXTRA_BYTES(13824, float)); + uint32_t w189 = XNN_INVALID_VALUE_ID; + std::array w189_dims = {{288, 1, 1, 48}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w189_dims.size(), w189_dims.data(), + /*data=*/w189_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w189); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w189" << std::endl; + return nullptr; + } + + static std::vector w190_data; + w190_data.resize(XNN_PAD_EXTRA_BYTES(288, float)); + uint32_t w190 = XNN_INVALID_VALUE_ID; + std::array w190_dims = {{288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w190_dims.size(), w190_dims.data(), + /*data=*/w190_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w190); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w190" << std::endl; + return nullptr; + } + + static std::vector w191_data; + w191_data.resize(XNN_PAD_EXTRA_BYTES(7200, float)); + uint32_t w191 = XNN_INVALID_VALUE_ID; + std::array w191_dims = {{1, 5, 5, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w191_dims.size(), w191_dims.data(), + /*data=*/w191_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w191); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w191" << std::endl; + return nullptr; + } + + static std::vector w192_data; + w192_data.resize(XNN_PAD_EXTRA_BYTES(288, float)); + uint32_t w192 = XNN_INVALID_VALUE_ID; + std::array w192_dims = {{288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w192_dims.size(), w192_dims.data(), + /*data=*/w192_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w192); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w192" << std::endl; + return nullptr; + } + + static std::vector w193_data; + w193_data.resize(XNN_PAD_EXTRA_BYTES(20736, float)); + uint32_t w193 = XNN_INVALID_VALUE_ID; + std::array w193_dims = {{72, 1, 1, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w193_dims.size(), w193_dims.data(), + /*data=*/w193_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w193); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w193" << std::endl; + return nullptr; + } + + static std::vector w194_data; + w194_data.resize(XNN_PAD_EXTRA_BYTES(72, float)); + uint32_t w194 = XNN_INVALID_VALUE_ID; + std::array w194_dims = {{72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w194_dims.size(), w194_dims.data(), + /*data=*/w194_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w194); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w194" << std::endl; + return nullptr; + } + + static std::vector w195_data; + w195_data.resize(XNN_PAD_EXTRA_BYTES(20736, float)); + uint32_t w195 = XNN_INVALID_VALUE_ID; + std::array w195_dims = {{288, 1, 1, 72}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w195_dims.size(), w195_dims.data(), + /*data=*/w195_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w195); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w195" << std::endl; + return nullptr; + } + + static std::vector w196_data; + w196_data.resize(XNN_PAD_EXTRA_BYTES(288, float)); + uint32_t w196 = XNN_INVALID_VALUE_ID; + std::array w196_dims = {{288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w196_dims.size(), w196_dims.data(), + /*data=*/w196_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w196); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w196" << std::endl; + return nullptr; + } + + static std::vector w197_data; + w197_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w197 = XNN_INVALID_VALUE_ID; + std::array w197_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w197_dims.size(), w197_dims.data(), + /*data=*/w197_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w197); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w197" << std::endl; + return nullptr; + } + + static std::vector w198_data; + w198_data.resize(XNN_PAD_EXTRA_BYTES(27648, float)); + uint32_t w198 = XNN_INVALID_VALUE_ID; + std::array w198_dims = {{96, 1, 1, 288}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w198_dims.size(), w198_dims.data(), + /*data=*/w198_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w198); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w198" << std::endl; + return nullptr; + } + + static std::vector w199_data; + w199_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w199 = XNN_INVALID_VALUE_ID; + std::array w199_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w199_dims.size(), w199_dims.data(), + /*data=*/w199_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w199); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w199" << std::endl; + return nullptr; + } + + static std::vector w200_data; + w200_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w200 = XNN_INVALID_VALUE_ID; + std::array w200_dims = {{576, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w200_dims.size(), w200_dims.data(), + /*data=*/w200_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w200); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w200" << std::endl; + return nullptr; + } + + static std::vector w201_data; + w201_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w201 = XNN_INVALID_VALUE_ID; + std::array w201_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w201_dims.size(), w201_dims.data(), + /*data=*/w201_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w201); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w201" << std::endl; + return nullptr; + } + + static std::vector w202_data; + w202_data.resize(XNN_PAD_EXTRA_BYTES(14400, float)); + uint32_t w202 = XNN_INVALID_VALUE_ID; + std::array w202_dims = {{1, 5, 5, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w202_dims.size(), w202_dims.data(), + /*data=*/w202_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w202); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w202" << std::endl; + return nullptr; + } + + static std::vector w203_data; + w203_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w203 = XNN_INVALID_VALUE_ID; + std::array w203_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w203_dims.size(), w203_dims.data(), + /*data=*/w203_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w203); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w203" << std::endl; + return nullptr; + } + + static std::vector w204_data; + w204_data.resize(XNN_PAD_EXTRA_BYTES(82944, float)); + uint32_t w204 = XNN_INVALID_VALUE_ID; + std::array w204_dims = {{144, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w204_dims.size(), w204_dims.data(), + /*data=*/w204_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w204); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w204" << std::endl; + return nullptr; + } + + static std::vector w205_data; + w205_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w205 = XNN_INVALID_VALUE_ID; + std::array w205_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w205_dims.size(), w205_dims.data(), + /*data=*/w205_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w205); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w205" << std::endl; + return nullptr; + } + + static std::vector w206_data; + w206_data.resize(XNN_PAD_EXTRA_BYTES(82944, float)); + uint32_t w206 = XNN_INVALID_VALUE_ID; + std::array w206_dims = {{576, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w206_dims.size(), w206_dims.data(), + /*data=*/w206_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w206); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w206" << std::endl; + return nullptr; + } + + static std::vector w207_data; + w207_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w207 = XNN_INVALID_VALUE_ID; + std::array w207_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w207_dims.size(), w207_dims.data(), + /*data=*/w207_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w207); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w207" << std::endl; + return nullptr; + } + + static std::vector w208_data; + w208_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w208 = XNN_INVALID_VALUE_ID; + std::array w208_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w208_dims.size(), w208_dims.data(), + /*data=*/w208_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w208); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w208" << std::endl; + return nullptr; + } + + static std::vector w209_data; + w209_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w209 = XNN_INVALID_VALUE_ID; + std::array w209_dims = {{96, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w209_dims.size(), w209_dims.data(), + /*data=*/w209_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w209); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w209" << std::endl; + return nullptr; + } + + static std::vector w210_data; + w210_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w210 = XNN_INVALID_VALUE_ID; + std::array w210_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w210_dims.size(), w210_dims.data(), + /*data=*/w210_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w210); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w210" << std::endl; + return nullptr; + } + + static std::vector w211_data; + w211_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w211 = XNN_INVALID_VALUE_ID; + std::array w211_dims = {{576, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w211_dims.size(), w211_dims.data(), + /*data=*/w211_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w211); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w211" << std::endl; + return nullptr; + } + + static std::vector w212_data; + w212_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w212 = XNN_INVALID_VALUE_ID; + std::array w212_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w212_dims.size(), w212_dims.data(), + /*data=*/w212_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w212); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w212" << std::endl; + return nullptr; + } + + static std::vector w213_data; + w213_data.resize(XNN_PAD_EXTRA_BYTES(14400, float)); + uint32_t w213 = XNN_INVALID_VALUE_ID; + std::array w213_dims = {{1, 5, 5, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w213_dims.size(), w213_dims.data(), + /*data=*/w213_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w213); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w213" << std::endl; + return nullptr; + } + + static std::vector w214_data; + w214_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w214 = XNN_INVALID_VALUE_ID; + std::array w214_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w214_dims.size(), w214_dims.data(), + /*data=*/w214_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w214); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w214" << std::endl; + return nullptr; + } + + static std::vector w215_data; + w215_data.resize(XNN_PAD_EXTRA_BYTES(82944, float)); + uint32_t w215 = XNN_INVALID_VALUE_ID; + std::array w215_dims = {{144, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w215_dims.size(), w215_dims.data(), + /*data=*/w215_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w215); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w215" << std::endl; + return nullptr; + } + + static std::vector w216_data; + w216_data.resize(XNN_PAD_EXTRA_BYTES(144, float)); + uint32_t w216 = XNN_INVALID_VALUE_ID; + std::array w216_dims = {{144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w216_dims.size(), w216_dims.data(), + /*data=*/w216_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w216); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w216" << std::endl; + return nullptr; + } + + static std::vector w217_data; + w217_data.resize(XNN_PAD_EXTRA_BYTES(82944, float)); + uint32_t w217 = XNN_INVALID_VALUE_ID; + std::array w217_dims = {{576, 1, 1, 144}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w217_dims.size(), w217_dims.data(), + /*data=*/w217_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w217); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w217" << std::endl; + return nullptr; + } + + static std::vector w218_data; + w218_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w218 = XNN_INVALID_VALUE_ID; + std::array w218_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w218_dims.size(), w218_dims.data(), + /*data=*/w218_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w218); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w218" << std::endl; + return nullptr; + } + + static std::vector w219_data; + w219_data.resize(XNN_PAD_EXTRA_BYTES(1, xnn_float16)); + uint32_t w219 = XNN_INVALID_VALUE_ID; + std::array w219_dims = {{1}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp16, w219_dims.size(), w219_dims.data(), + /*data=*/w219_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w219); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w219" << std::endl; + return nullptr; + } + + static std::vector w220_data; + w220_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w220 = XNN_INVALID_VALUE_ID; + std::array w220_dims = {{96, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w220_dims.size(), w220_dims.data(), + /*data=*/w220_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w220); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w220" << std::endl; + return nullptr; + } + + static std::vector w221_data; + w221_data.resize(XNN_PAD_EXTRA_BYTES(96, float)); + uint32_t w221 = XNN_INVALID_VALUE_ID; + std::array w221_dims = {{96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w221_dims.size(), w221_dims.data(), + /*data=*/w221_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w221); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w221" << std::endl; + return nullptr; + } + + static std::vector w222_data; + w222_data.resize(XNN_PAD_EXTRA_BYTES(55296, float)); + uint32_t w222 = XNN_INVALID_VALUE_ID; + std::array w222_dims = {{576, 1, 1, 96}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w222_dims.size(), w222_dims.data(), + /*data=*/w222_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w222); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w222" << std::endl; + return nullptr; + } + + static std::vector w223_data; + w223_data.resize(XNN_PAD_EXTRA_BYTES(576, float)); + uint32_t w223 = XNN_INVALID_VALUE_ID; + std::array w223_dims = {{576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w223_dims.size(), w223_dims.data(), + /*data=*/w223_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w223); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w223" << std::endl; + return nullptr; + } + + static std::vector w224_data; + w224_data.resize(XNN_PAD_EXTRA_BYTES(589824, float)); + uint32_t w224 = XNN_INVALID_VALUE_ID; + std::array w224_dims = {{1024, 1, 1, 576}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w224_dims.size(), w224_dims.data(), + /*data=*/w224_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w224); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w224" << std::endl; + return nullptr; + } + + static std::vector w225_data; + w225_data.resize(XNN_PAD_EXTRA_BYTES(1024, float)); + uint32_t w225 = XNN_INVALID_VALUE_ID; + std::array w225_dims = {{1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w225_dims.size(), w225_dims.data(), + /*data=*/w225_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w225); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w225" << std::endl; + return nullptr; + } + + static std::vector w226_data; + w226_data.resize(XNN_PAD_EXTRA_BYTES(1025024, float)); + uint32_t w226 = XNN_INVALID_VALUE_ID; + std::array w226_dims = {{1001, 1, 1, 1024}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w226_dims.size(), w226_dims.data(), + /*data=*/w226_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w226); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w226" << std::endl; + return nullptr; + } + + static std::vector w227_data; + w227_data.resize(XNN_PAD_EXTRA_BYTES(1001, float)); + uint32_t w227 = XNN_INVALID_VALUE_ID; + std::array w227_dims = {{1001}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_fp32, w227_dims.size(), w227_dims.data(), + /*data=*/w227_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w227); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w227" << std::endl; + return nullptr; + } + + static std::vector w228_data; + w228_data.resize(XNN_PAD_EXTRA_BYTES(2, int32_t)); + uint32_t w228 = XNN_INVALID_VALUE_ID; + std::array w228_dims = {{2}}; + status = xnn_define_tensor_value( + subgraph, xnn_datatype_int32, w228_dims.size(), w228_dims.data(), + /*data=*/w228_data.data(), XNN_INVALID_VALUE_ID, /*flags=*/0, &w228); + if (status != xnn_status_success) { + std::cerr << "failed to create tensor w228" << std::endl; + return nullptr; + } + + auto f32rng = std::bind(std::uniform_real_distribution(-1.0f, +1.0f), + std::ref(rng)); + auto f16rng = [&]() { + return fp16_ieee_from_fp32_value(f32rng()); + }; + auto i32rng = std::bind(std::uniform_int_distribution(-10000, 10000), + std::ref(rng)); + std::generate(w111_data.begin(), w111_data.end(), std::ref(f32rng)); + std::generate(w112_data.begin(), w112_data.end(), std::ref(f32rng)); + std::generate(w113_data.begin(), w113_data.end(), std::ref(f32rng)); + std::generate(w114_data.begin(), w114_data.end(), std::ref(f32rng)); + std::generate(w115_data.begin(), w115_data.end(), std::ref(f32rng)); + std::generate(w116_data.begin(), w116_data.end(), std::ref(f32rng)); + std::generate(w117_data.begin(), w117_data.end(), std::ref(f32rng)); + std::generate(w118_data.begin(), w118_data.end(), std::ref(f32rng)); + std::generate(w119_data.begin(), w119_data.end(), std::ref(f16rng)); + std::generate(w120_data.begin(), w120_data.end(), std::ref(f32rng)); + std::generate(w121_data.begin(), w121_data.end(), std::ref(f32rng)); + std::generate(w122_data.begin(), w122_data.end(), std::ref(f32rng)); + std::generate(w123_data.begin(), w123_data.end(), std::ref(f32rng)); + std::generate(w124_data.begin(), w124_data.end(), std::ref(f32rng)); + std::generate(w125_data.begin(), w125_data.end(), std::ref(f32rng)); + std::generate(w126_data.begin(), w126_data.end(), std::ref(f32rng)); + std::generate(w127_data.begin(), w127_data.end(), std::ref(f32rng)); + std::generate(w128_data.begin(), w128_data.end(), std::ref(f32rng)); + std::generate(w129_data.begin(), w129_data.end(), std::ref(f32rng)); + std::generate(w130_data.begin(), w130_data.end(), std::ref(f32rng)); + std::generate(w131_data.begin(), w131_data.end(), std::ref(f32rng)); + std::generate(w132_data.begin(), w132_data.end(), std::ref(f32rng)); + std::generate(w133_data.begin(), w133_data.end(), std::ref(f32rng)); + std::generate(w134_data.begin(), w134_data.end(), std::ref(f32rng)); + std::generate(w135_data.begin(), w135_data.end(), std::ref(f32rng)); + std::generate(w136_data.begin(), w136_data.end(), std::ref(f32rng)); + std::generate(w137_data.begin(), w137_data.end(), std::ref(f32rng)); + std::generate(w138_data.begin(), w138_data.end(), std::ref(f32rng)); + std::generate(w139_data.begin(), w139_data.end(), std::ref(f32rng)); + std::generate(w140_data.begin(), w140_data.end(), std::ref(f32rng)); + std::generate(w141_data.begin(), w141_data.end(), std::ref(f32rng)); + std::generate(w142_data.begin(), w142_data.end(), std::ref(f16rng)); + std::generate(w143_data.begin(), w143_data.end(), std::ref(f32rng)); + std::generate(w144_data.begin(), w144_data.end(), std::ref(f32rng)); + std::generate(w145_data.begin(), w145_data.end(), std::ref(f32rng)); + std::generate(w146_data.begin(), w146_data.end(), std::ref(f32rng)); + std::generate(w147_data.begin(), w147_data.end(), std::ref(f32rng)); + std::generate(w148_data.begin(), w148_data.end(), std::ref(f32rng)); + std::generate(w149_data.begin(), w149_data.end(), std::ref(f32rng)); + std::generate(w150_data.begin(), w150_data.end(), std::ref(f32rng)); + std::generate(w151_data.begin(), w151_data.end(), std::ref(f32rng)); + std::generate(w152_data.begin(), w152_data.end(), std::ref(f32rng)); + std::generate(w153_data.begin(), w153_data.end(), std::ref(f16rng)); + std::generate(w154_data.begin(), w154_data.end(), std::ref(f32rng)); + std::generate(w155_data.begin(), w155_data.end(), std::ref(f32rng)); + std::generate(w156_data.begin(), w156_data.end(), std::ref(f32rng)); + std::generate(w157_data.begin(), w157_data.end(), std::ref(f32rng)); + std::generate(w158_data.begin(), w158_data.end(), std::ref(f32rng)); + std::generate(w159_data.begin(), w159_data.end(), std::ref(f32rng)); + std::generate(w160_data.begin(), w160_data.end(), std::ref(f32rng)); + std::generate(w161_data.begin(), w161_data.end(), std::ref(f32rng)); + std::generate(w162_data.begin(), w162_data.end(), std::ref(f32rng)); + std::generate(w163_data.begin(), w163_data.end(), std::ref(f32rng)); + std::generate(w164_data.begin(), w164_data.end(), std::ref(f16rng)); + std::generate(w165_data.begin(), w165_data.end(), std::ref(f32rng)); + std::generate(w166_data.begin(), w166_data.end(), std::ref(f32rng)); + std::generate(w167_data.begin(), w167_data.end(), std::ref(f32rng)); + std::generate(w168_data.begin(), w168_data.end(), std::ref(f32rng)); + std::generate(w169_data.begin(), w169_data.end(), std::ref(f32rng)); + std::generate(w170_data.begin(), w170_data.end(), std::ref(f32rng)); + std::generate(w171_data.begin(), w171_data.end(), std::ref(f32rng)); + std::generate(w172_data.begin(), w172_data.end(), std::ref(f32rng)); + std::generate(w173_data.begin(), w173_data.end(), std::ref(f32rng)); + std::generate(w174_data.begin(), w174_data.end(), std::ref(f32rng)); + std::generate(w175_data.begin(), w175_data.end(), std::ref(f16rng)); + std::generate(w176_data.begin(), w176_data.end(), std::ref(f32rng)); + std::generate(w177_data.begin(), w177_data.end(), std::ref(f32rng)); + std::generate(w178_data.begin(), w178_data.end(), std::ref(f32rng)); + std::generate(w179_data.begin(), w179_data.end(), std::ref(f32rng)); + std::generate(w180_data.begin(), w180_data.end(), std::ref(f32rng)); + std::generate(w181_data.begin(), w181_data.end(), std::ref(f32rng)); + std::generate(w182_data.begin(), w182_data.end(), std::ref(f32rng)); + std::generate(w183_data.begin(), w183_data.end(), std::ref(f32rng)); + std::generate(w184_data.begin(), w184_data.end(), std::ref(f32rng)); + std::generate(w185_data.begin(), w185_data.end(), std::ref(f32rng)); + std::generate(w186_data.begin(), w186_data.end(), std::ref(f16rng)); + std::generate(w187_data.begin(), w187_data.end(), std::ref(f32rng)); + std::generate(w188_data.begin(), w188_data.end(), std::ref(f32rng)); + std::generate(w189_data.begin(), w189_data.end(), std::ref(f32rng)); + std::generate(w190_data.begin(), w190_data.end(), std::ref(f32rng)); + std::generate(w191_data.begin(), w191_data.end(), std::ref(f32rng)); + std::generate(w192_data.begin(), w192_data.end(), std::ref(f32rng)); + std::generate(w193_data.begin(), w193_data.end(), std::ref(f32rng)); + std::generate(w194_data.begin(), w194_data.end(), std::ref(f32rng)); + std::generate(w195_data.begin(), w195_data.end(), std::ref(f32rng)); + std::generate(w196_data.begin(), w196_data.end(), std::ref(f32rng)); + std::generate(w197_data.begin(), w197_data.end(), std::ref(f16rng)); + std::generate(w198_data.begin(), w198_data.end(), std::ref(f32rng)); + std::generate(w199_data.begin(), w199_data.end(), std::ref(f32rng)); + std::generate(w200_data.begin(), w200_data.end(), std::ref(f32rng)); + std::generate(w201_data.begin(), w201_data.end(), std::ref(f32rng)); + std::generate(w202_data.begin(), w202_data.end(), std::ref(f32rng)); + std::generate(w203_data.begin(), w203_data.end(), std::ref(f32rng)); + std::generate(w204_data.begin(), w204_data.end(), std::ref(f32rng)); + std::generate(w205_data.begin(), w205_data.end(), std::ref(f32rng)); + std::generate(w206_data.begin(), w206_data.end(), std::ref(f32rng)); + std::generate(w207_data.begin(), w207_data.end(), std::ref(f32rng)); + std::generate(w208_data.begin(), w208_data.end(), std::ref(f16rng)); + std::generate(w209_data.begin(), w209_data.end(), std::ref(f32rng)); + std::generate(w210_data.begin(), w210_data.end(), std::ref(f32rng)); + std::generate(w211_data.begin(), w211_data.end(), std::ref(f32rng)); + std::generate(w212_data.begin(), w212_data.end(), std::ref(f32rng)); + std::generate(w213_data.begin(), w213_data.end(), std::ref(f32rng)); + std::generate(w214_data.begin(), w214_data.end(), std::ref(f32rng)); + std::generate(w215_data.begin(), w215_data.end(), std::ref(f32rng)); + std::generate(w216_data.begin(), w216_data.end(), std::ref(f32rng)); + std::generate(w217_data.begin(), w217_data.end(), std::ref(f32rng)); + std::generate(w218_data.begin(), w218_data.end(), std::ref(f32rng)); + std::generate(w219_data.begin(), w219_data.end(), std::ref(f16rng)); + std::generate(w220_data.begin(), w220_data.end(), std::ref(f32rng)); + std::generate(w221_data.begin(), w221_data.end(), std::ref(f32rng)); + std::generate(w222_data.begin(), w222_data.end(), std::ref(f32rng)); + std::generate(w223_data.begin(), w223_data.end(), std::ref(f32rng)); + std::generate(w224_data.begin(), w224_data.end(), std::ref(f32rng)); + std::generate(w225_data.begin(), w225_data.end(), std::ref(f32rng)); + std::generate(w226_data.begin(), w226_data.end(), std::ref(f32rng)); + std::generate(w227_data.begin(), w227_data.end(), std::ref(f32rng)); + std::generate(w228_data.begin(), w228_data.end(), std::ref(i32rng)); + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/3, + /*group_output_channels=*/16, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v0, w111, w112, v1, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #0" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v1, v2, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #1" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/16, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v2, w113, w114, v3, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #2" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/56, /*pooling_width=*/56, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v3, v4, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #3" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/16, + /*group_output_channels=*/8, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v4, w115, w116, v5, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #4" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/8, + /*group_output_channels=*/16, + /*output_min=*/0.0f, /*output_max=*/6.0f, v5, w117, w118, v6, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #5" << std::endl; + return nullptr; + } + + xnn_binary_params v7_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v7_params, + /*input1_id=*/v6, + /*input2_id=*/w119, + /*output_id=*/v7, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #6" << std::endl; + return nullptr; + } + + xnn_binary_params v8_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v8_params, + /*input1_id=*/v3, + /*input2_id=*/v7, + /*output_id=*/v8, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #7" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/16, + /*group_output_channels=*/16, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v8, w120, w121, v9, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #8" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/16, + /*group_output_channels=*/72, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v9, w122, w123, + v10, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #9" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/72, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v10, w124, w125, + v11, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #10" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/72, + /*group_output_channels=*/24, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v11, w126, w127, + v12, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #11" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/88, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v12, w128, w129, + v13, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #12" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/1, /*padding_right=*/1, /*padding_bottom=*/1, + /*padding_left=*/1, + /*kernel_height=*/3, /*kernel_width=*/3, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/88, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v13, w130, w131, + v14, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #13" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/88, + /*group_output_channels=*/24, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v14, w132, w133, + v15, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #14" << std::endl; + return nullptr; + } + + xnn_binary_params v16_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v16_params, + /*input1_id=*/v15, + /*input2_id=*/v12, + /*output_id=*/v16, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #15" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v16, w134, w135, + v17, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #16" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v17, v18, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #17" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v18, w136, w137, + v19, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #18" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v19, v20, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #19" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/14, /*pooling_width=*/14, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v20, v21, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #20" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/24, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v21, w138, w139, + v22, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #21" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/24, + /*group_output_channels=*/96, + /*output_min=*/0.0f, /*output_max=*/6.0f, v22, w140, w141, v23, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #22" << std::endl; + return nullptr; + } + + xnn_binary_params v24_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v24_params, + /*input1_id=*/v23, + /*input2_id=*/w142, + /*output_id=*/v24, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #23" << std::endl; + return nullptr; + } + + xnn_binary_params v25_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v25_params, + /*input1_id=*/v20, + /*input2_id=*/v24, + /*output_id=*/v25, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #24" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/40, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v25, w143, w144, + v26, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #25" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/40, + /*group_output_channels=*/240, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v26, w145, w146, + v27, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #26" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v27, v28, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #27" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/240, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v28, w147, w148, + v29, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #28" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v29, v30, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #29" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/14, /*pooling_width=*/14, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v30, v31, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #30" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/240, + /*group_output_channels=*/64, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v31, w149, w150, + v32, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #31" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/240, + /*output_min=*/0.0f, /*output_max=*/6.0f, v32, w151, w152, v33, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #32" << std::endl; + return nullptr; + } + + xnn_binary_params v34_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v34_params, + /*input1_id=*/v33, + /*input2_id=*/w153, + /*output_id=*/v34, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #33" << std::endl; + return nullptr; + } + + xnn_binary_params v35_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v35_params, + /*input1_id=*/v30, + /*input2_id=*/v34, + /*output_id=*/v35, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #34" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/240, + /*group_output_channels=*/40, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v35, w154, w155, + v36, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #35" << std::endl; + return nullptr; + } + + xnn_binary_params v37_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v37_params, + /*input1_id=*/v36, + /*input2_id=*/v26, + /*output_id=*/v37, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #36" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/40, + /*group_output_channels=*/240, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v37, w156, w157, + v38, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #37" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v38, v39, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #38" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/240, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v39, w158, w159, + v40, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #39" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v40, v41, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #40" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/14, /*pooling_width=*/14, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v41, v42, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #41" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/240, + /*group_output_channels=*/64, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v42, w160, w161, + v43, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #42" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/64, + /*group_output_channels=*/240, + /*output_min=*/0.0f, /*output_max=*/6.0f, v43, w162, w163, v44, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #43" << std::endl; + return nullptr; + } + + xnn_binary_params v45_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v45_params, + /*input1_id=*/v44, + /*input2_id=*/w164, + /*output_id=*/v45, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #44" << std::endl; + return nullptr; + } + + xnn_binary_params v46_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v46_params, + /*input1_id=*/v41, + /*input2_id=*/v45, + /*output_id=*/v46, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #45" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/240, + /*group_output_channels=*/40, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v46, w165, w166, + v47, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #46" << std::endl; + return nullptr; + } + + xnn_binary_params v48_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v48_params, + /*input1_id=*/v47, + /*input2_id=*/v37, + /*output_id=*/v48, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #47" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/40, + /*group_output_channels=*/120, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v48, w167, w168, + v49, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #48" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v49, v50, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #49" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/120, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v50, w169, w170, + v51, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #50" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v51, v52, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #51" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/14, /*pooling_width=*/14, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v52, v53, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #52" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/120, + /*group_output_channels=*/32, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v53, w171, w172, + v54, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #53" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/32, + /*group_output_channels=*/120, + /*output_min=*/0.0f, /*output_max=*/6.0f, v54, w173, w174, v55, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #54" << std::endl; + return nullptr; + } + + xnn_binary_params v56_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v56_params, + /*input1_id=*/v55, + /*input2_id=*/w175, + /*output_id=*/v56, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #55" << std::endl; + return nullptr; + } + + xnn_binary_params v57_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v57_params, + /*input1_id=*/v52, + /*input2_id=*/v56, + /*output_id=*/v57, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #56" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/120, + /*group_output_channels=*/48, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v57, w176, w177, + v58, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #57" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/48, + /*group_output_channels=*/144, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v58, w178, w179, + v59, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #58" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v59, v60, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #59" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/144, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v60, w180, w181, + v61, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #60" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v61, v62, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #61" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/14, /*pooling_width=*/14, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v62, v63, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #62" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/144, + /*group_output_channels=*/40, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v63, w182, w183, + v64, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #63" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/40, + /*group_output_channels=*/144, + /*output_min=*/0.0f, /*output_max=*/6.0f, v64, w184, w185, v65, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #64" << std::endl; + return nullptr; + } + + xnn_binary_params v66_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v66_params, + /*input1_id=*/v65, + /*input2_id=*/w186, + /*output_id=*/v66, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #65" << std::endl; + return nullptr; + } + + xnn_binary_params v67_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v67_params, + /*input1_id=*/v62, + /*input2_id=*/v66, + /*output_id=*/v67, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #66" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/144, + /*group_output_channels=*/48, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v67, w187, w188, + v68, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #67" << std::endl; + return nullptr; + } + + xnn_binary_params v69_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v69_params, + /*input1_id=*/v68, + /*input2_id=*/v58, + /*output_id=*/v69, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #68" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/48, + /*group_output_channels=*/288, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v69, w189, w190, + v70, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #69" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v70, v71, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #70" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/2, /*subsampling_width=*/2, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/288, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v71, w191, w192, + v72, + /*flags=*/XNN_FLAG_TENSORFLOW_SAME_PADDING); + if (status != xnn_status_success) { + std::cerr << "failed to create node #71" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v72, v73, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #72" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v73, v74, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #73" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/288, + /*group_output_channels=*/72, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v74, w193, w194, + v75, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #74" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/72, + /*group_output_channels=*/288, + /*output_min=*/0.0f, /*output_max=*/6.0f, v75, w195, w196, v76, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #75" << std::endl; + return nullptr; + } + + xnn_binary_params v77_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v77_params, + /*input1_id=*/v76, + /*input2_id=*/w197, + /*output_id=*/v77, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #76" << std::endl; + return nullptr; + } + + xnn_binary_params v78_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v78_params, + /*input1_id=*/v73, + /*input2_id=*/v77, + /*output_id=*/v78, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #77" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/288, + /*group_output_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v78, w198, w199, + v79, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #78" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/576, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v79, w200, w201, + v80, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #79" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v80, v81, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #80" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/576, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v81, w202, w203, + v82, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #81" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v82, v83, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #82" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v83, v84, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #83" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/144, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v84, w204, w205, + v85, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #84" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/144, + /*group_output_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v85, w206, w207, v86, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #85" << std::endl; + return nullptr; + } + + xnn_binary_params v87_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v87_params, + /*input1_id=*/v86, + /*input2_id=*/w208, + /*output_id=*/v87, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #86" << std::endl; + return nullptr; + } + + xnn_binary_params v88_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v88_params, + /*input1_id=*/v83, + /*input2_id=*/v87, + /*output_id=*/v88, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #87" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v88, w209, w210, + v89, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #88" << std::endl; + return nullptr; + } + + xnn_binary_params v90_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v90_params, + /*input1_id=*/v89, + /*input2_id=*/v79, + /*output_id=*/v90, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #89" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/576, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v90, w211, w212, + v91, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #90" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v91, v92, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #91" << std::endl; + return nullptr; + } + + status = xnn_define_depthwise_convolution_2d( + subgraph, + /*padding_top=*/2, /*padding_right=*/2, /*padding_bottom=*/2, + /*padding_left=*/2, + /*kernel_height=*/5, /*kernel_width=*/5, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*depth_multiplier=*/1, + /*input_channels=*/576, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v92, w213, w214, + v93, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #92" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v93, v94, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #93" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v94, v95, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #94" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/144, + /*output_min=*/0.0f, + /*output_max=*/std::numeric_limits::infinity(), v95, w215, w216, + v96, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #95" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/144, + /*group_output_channels=*/576, + /*output_min=*/0.0f, /*output_max=*/6.0f, v96, w217, w218, v97, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #96" << std::endl; + return nullptr; + } + + xnn_binary_params v98_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v98_params, + /*input1_id=*/v97, + /*input2_id=*/w219, + /*output_id=*/v98, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #97" << std::endl; + return nullptr; + } + + xnn_binary_params v99_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_multiply, &v99_params, + /*input1_id=*/v94, + /*input2_id=*/v98, + /*output_id=*/v99, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #98" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/96, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v99, w220, w221, + v100, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #99" << std::endl; + return nullptr; + } + + xnn_binary_params v101_params = {-std::numeric_limits::infinity(), + std::numeric_limits::infinity()}; + status = xnn_define_binary(subgraph, xnn_binary_add, &v101_params, + /*input1_id=*/v100, + /*input2_id=*/v90, + /*output_id=*/v101, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #100" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/96, + /*group_output_channels=*/576, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v101, w222, w223, + v102, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #101" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v102, v103, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #102" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/7, /*pooling_width=*/7, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v103, v104, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #103" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/576, + /*group_output_channels=*/1024, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v104, w224, w225, + v105, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #104" << std::endl; + return nullptr; + } + + status = xnn_define_unary(subgraph, xnn_unary_hardswish, + /*params=*/nullptr, v105, v106, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #105" << std::endl; + return nullptr; + } + + status = xnn_define_average_pooling_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*pooling_height=*/1, /*pooling_width=*/1, + /*stride_height=*/1, /*stride_width=*/1, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v106, v107, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #106" << std::endl; + return nullptr; + } + + status = xnn_define_convolution_2d( + subgraph, + /*padding_top=*/0, /*padding_right=*/0, /*padding_bottom=*/0, + /*padding_left=*/0, + /*kernel_height=*/1, /*kernel_width=*/1, + /*subsampling_height=*/1, /*subsampling_width=*/1, + /*dilation_height=*/1, /*dilation_width=*/1, + /*groups=*/1, + /*group_input_channels=*/1024, + /*group_output_channels=*/1001, + /*output_min=*/-std::numeric_limits::infinity(), + /*output_max=*/std::numeric_limits::infinity(), v107, w226, w227, + v108, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #107" << std::endl; + return nullptr; + } + + status = xnn_define_copy(subgraph, + /*input_id=*/v108, + /*output_id=*/v109, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #108" << std::endl; + return nullptr; + } + + status = xnn_define_softmax(subgraph, v109, v110, + /*flags=*/0); + if (status != xnn_status_success) { + std::cerr << "failed to create node #109" << std::endl; + return nullptr; + } + + return subgraph; +} // NOLINT(readability/fn_size) + +} // namespace models diff --git a/bench/subgraph/mobilenet.cc b/bench/subgraph/mobilenet.cc index 01f76a5eb88..293359cb945 100644 --- a/bench/subgraph/mobilenet.cc +++ b/bench/subgraph/mobilenet.cc @@ -8,7 +8,6 @@ #include "bench/subgraph/benchmark.h" #include "bench/subgraph/models.h" -#include "include/xnnpack.h" #include static void FP32MobileNetV1(benchmark::State& state) { @@ -28,23 +27,19 @@ static void FP32MobileNetV3Small(benchmark::State& state) { } static void FP16MobileNetV1(benchmark::State& state) { - xnnpack::RunBenchmark(state, models::FP32MobileNetV1, - XNN_FLAG_FORCE_FP16_INFERENCE); + xnnpack::RunBenchmark(state, models::FP16MobileNetV1); } static void FP16MobileNetV2(benchmark::State& state) { - xnnpack::RunBenchmark(state, models::FP32MobileNetV2, - XNN_FLAG_FORCE_FP16_INFERENCE); + xnnpack::RunBenchmark(state, models::FP16MobileNetV2); } static void FP16MobileNetV3Large(benchmark::State& state) { - xnnpack::RunBenchmark(state, models::FP32MobileNetV3Large, - XNN_FLAG_FORCE_FP16_INFERENCE); + xnnpack::RunBenchmark(state, models::FP16MobileNetV3Large); } static void FP16MobileNetV3Small(benchmark::State& state) { - xnnpack::RunBenchmark(state, models::FP32MobileNetV3Small, - XNN_FLAG_FORCE_FP16_INFERENCE); + xnnpack::RunBenchmark(state, models::FP16MobileNetV3Small); } static void QS8MobileNetV2(benchmark::State& state) { diff --git a/bench/subgraph/models.h b/bench/subgraph/models.h index 90d7af80f13..25374e27ccd 100644 --- a/bench/subgraph/models.h +++ b/bench/subgraph/models.h @@ -8,12 +8,15 @@ #include #include -#include #include "include/xnnpack.h" namespace models { +xnn_subgraph_t FP16MobileNetV1(); +xnn_subgraph_t FP16MobileNetV2(); +xnn_subgraph_t FP16MobileNetV3Large(); +xnn_subgraph_t FP16MobileNetV3Small(); xnn_subgraph_t FP32MobileNetV1(); xnn_subgraph_t FP32MobileNetV2(); xnn_subgraph_t FP32MobileNetV3Large(); diff --git a/include/experimental.h b/include/experimental.h index 770109d73ef..c206b1a6691 100644 --- a/include/experimental.h +++ b/include/experimental.h @@ -63,7 +63,7 @@ enum xnn_status xnn_delete_threadpool(xnn_threadpool_t threadpool); /// workspace is NULL, there will be no sharing: each runtime has its own workspace. /// @param threadpool - Threadpool object to to implement parallel operations. /// @param flags - binary features of the runtime. The only currently supported values are -/// XNN_FLAG_HINT_SPARSE_INFERENCE, XNN_FLAG_HINT_FP16_INFERENCE, XNN_FLAG_FORCE_FP16_INFERENCE +/// XNN_FLAG_HINT_SPARSE_INFERENCE /// @param runtime_out - pointer to the variable that will be initialized with a handle to the Runtime object upon /// successful return. Once constructed, the Runtime object is independent of the Subgraph object /// used to create it. diff --git a/include/xnnpack.h b/include/xnnpack.h index 1b5d0dd1fd7..461ee1a4cbd 100644 --- a/include/xnnpack.h +++ b/include/xnnpack.h @@ -42,19 +42,8 @@ extern "C" { /// Note: this flag is a hint to XNNPACK that it should consider sparse inference, but does not guarantee it. #define XNN_FLAG_HINT_SPARSE_INFERENCE 0x00000001 -/// Allow IEEE FP16 inference in a Runtime. -/// -/// Note: this flag hints XNNPACK to consider IEEE FP16 inference, but does not guarantee it. -#define XNN_FLAG_HINT_FP16_INFERENCE 0x00000002 - -/// Force IEEE FP16 inference in a Runtime, and fail if FP16 inference is not possible. -/// -/// Note: this flag guarantees that XNNPACK will use IEEE FP16 inference, or fail to create the Runtime object. -/// Warning: on x86 systems FP16 computations will be emulated at a substantial performance cost. -#define XNN_FLAG_FORCE_FP16_INFERENCE 0x00000004 - /// Enable timing of each operator's runtime. -#define XNN_FLAG_BASIC_PROFILING 0x00000008 +#define XNN_FLAG_BASIC_PROFILING 0x00000002 /// The convolution operator represents a depthwise convolution, and use HWGo layout for filters. #define XNN_FLAG_DEPTHWISE_CONVOLUTION 0x00000001 @@ -2445,12 +2434,11 @@ enum xnn_status xnn_get_runtime_profiling_info(xnn_runtime_t runtime, /// @param threadpool - the thread pool to be used for parallelisation of computations in the runtime. If the thread /// pool is NULL, the computation would run on the caller thread without parallelization. /// @param flags - binary features of the runtime. The only currently supported values are -/// XNN_FLAG_HINT_SPARSE_INFERENCE, XNN_FLAG_HINT_FP16_INFERENCE, XNN_FLAG_FORCE_FP16_INFERENCE, -/// XNN_FLAG_DONT_SPIN_WORKERS, and XNN_FLAG_TRANSIENT_INDIRECTION_BUFFER. If XNN_FLAG_DONT_SPIN_WORKERS is -/// specified, worker threads would be yielded to the system scheduler after processing the last operator -/// in the Runtime. If XNN_FLAG_TRANSIENT_INDIRECTION_BUFFER is specified, convolution operators will -/// initialize indirection buffers on each inference run using temporary memory in the workspace, instead -/// of initializing persistent indirection buffers once. +/// XNN_FLAG_HINT_SPARSE_INFERENCE, XNN_FLAG_DONT_SPIN_WORKERS, and XNN_FLAG_TRANSIENT_INDIRECTION_BUFFER. +/// If XNN_FLAG_DONT_SPIN_WORKERS is specified, worker threads would be yielded to the system scheduler +/// after processing the last operator in the Runtime. If XNN_FLAG_TRANSIENT_INDIRECTION_BUFFER is +/// specified, convolution operators will initialize indirection buffers on each inference run using +/// temporary memory in the workspace, instead of initializing persistent indirection buffers once. /// @param runtime_out - pointer to the variable that will be initialized with a handle to the Runtime object upon /// successful return. Once constructed, the Runtime object is independent of the Subgraph object /// used to create it. diff --git a/src/runtime.c b/src/runtime.c index aa22e7615c5..dbbd538b761 100644 --- a/src/runtime.c +++ b/src/runtime.c @@ -575,8 +575,7 @@ static enum xnn_status create_runtime_impl( } const uint32_t optimization_flags = - XNN_FLAG_HINT_SPARSE_INFERENCE | XNN_FLAG_HINT_FP16_INFERENCE | - XNN_FLAG_FORCE_FP16_INFERENCE | XNN_FLAG_NO_OPERATOR_FUSION | + XNN_FLAG_HINT_SPARSE_INFERENCE | XNN_FLAG_NO_OPERATOR_FUSION | XNN_FLAG_NO_INLINED_LHS_PACKING | XNN_FLAG_SLOW_CONSISTENT_ARITHMETIC; status = xnn_subgraph_optimize(subgraph, flags & optimization_flags); @@ -702,21 +701,6 @@ static enum xnn_status create_runtime_impl( runtime->threadpool = threadpool; - for (uint32_t i = 0; i < runtime->num_values; i++) { - struct xnn_runtime_value* value = &runtime->values[i]; - if (!xnn_value_is_valid(value->type)) { - continue; - } - - if (value->flags & XNN_VALUE_FLAG_FP16_COMPATIBLE && xnn_value_is_static(value->allocation_type)) { - // Value is static and has been converted to FP16 in a new buffer. - value->flags |= XNN_VALUE_FLAG_NEEDS_CLEANUP; - // Runtime takes ownership of the data from subgraph. - value->data = subgraph->values[i].data; - subgraph->values[i].data = NULL; - } - } - // Create and/or add a workspace. if (workspace == NULL) { xnn_log_debug("Allocating non-shared workspace"); diff --git a/src/subgraph.c b/src/subgraph.c index f1925d1627b..799233e6cc2 100644 --- a/src/subgraph.c +++ b/src/subgraph.c @@ -13,7 +13,6 @@ #include #include -#include "include/experimental.h" #include "include/xnnpack.h" #include "src/xnnpack/allocation-type.h" #include "src/xnnpack/allocator.h" @@ -21,7 +20,6 @@ #include "src/xnnpack/config-types.h" #include "src/xnnpack/config.h" #include "src/xnnpack/datatype.h" -#include "src/xnnpack/fp16.h" #include "src/xnnpack/hardware-config.h" #include "src/xnnpack/internal.h" #include "src/xnnpack/log.h" @@ -229,9 +227,6 @@ void xnn_runtime_value_copy(struct xnn_runtime_value* dst_value, if (src_value->num_consumers == 1) { dst_value->flags |= XNN_VALUE_FLAG_ONE_CONSUMER; } - if (src_value->fp16_rewrite.fp16_compatible) { - dst_value->flags |= XNN_VALUE_FLAG_FP16_COMPATIBLE; - } if (src_value->layout == xnn_layout_type_nchw) { dst_value->flags |= XNN_VALUE_FLAG_LAYOUT_NCHW; } @@ -937,528 +932,6 @@ static bool any_values_fp32(xnn_subgraph_t subgraph, return false; } -static bool all_values_fp32_or_pfp32(xnn_subgraph_t subgraph, - const struct xnn_node* node) { - for (uint32_t i = 0; i < node->num_inputs; i++) { - if (subgraph->values[node->inputs[i]].datatype != xnn_datatype_fp32 && - subgraph->values[node->inputs[i]].datatype != xnn_datatype_pfp32) { - return false; - } - } - for (uint32_t i = 0; i < node->num_outputs; i++) { - if (subgraph->values[node->outputs[i]].datatype != xnn_datatype_fp32 && - subgraph->values[node->outputs[i]].datatype != xnn_datatype_pfp32) { - return false; - } - } - return true; -} - -bool xnn_subgraph_rewrite_for_fp16(xnn_subgraph_t subgraph) { - xnn_log_info("Analyzing subgraph for FP16 compatibility"); - - // Count the number of consumers for each value. - xnn_subgraph_analyze_consumers_and_producers(subgraph); - - // Convert tensors and operators in the subgraph to FP16 - // 1. Check that all operators in the subgraph are supported in FP16. - // 2. Indicate values that must be converted to FP16. - // 3. Replace FP32 Values with FP16 Values as Nodes' inputs/outputs. - // 4. Insert FP32->FP16 Convert Nodes for external FP32 inputs and FP16->FP32 - // Convert Nodes for external outputs. - - const uint32_t num_original_values = subgraph->num_values; - - // Check that all operators in the subgraph are supported in FP16, bail out on - // any unsupported one. - for (uint32_t n = 0; n < subgraph->num_nodes; n++) { - struct xnn_node* node = &subgraph->nodes[n]; - if (node->type == xnn_node_type_invalid) { - // Node was fused away, skip. - continue; - } - - if (!any_values_fp32(subgraph, node)) { - xnn_log_warning("FP16 rewrite aborted: node #%" PRIu32 - " (%s) is not FP32", - n, xnn_node_type_to_string(node->type)); - return false; - } - switch (node->type) { - case xnn_node_type_average_pooling_2d: - case xnn_node_type_batch_matrix_multiply: - case xnn_node_type_binary_elementwise: - case xnn_node_type_concatenate: - case xnn_node_type_convert: - case xnn_node_type_convolution_2d: - case xnn_node_type_copy: - case xnn_node_type_deconvolution_2d: - case xnn_node_type_depth_to_space_2d: - case xnn_node_type_depthwise_convolution_2d: - case xnn_node_type_even_split: - case xnn_node_type_fully_connected: - case xnn_node_type_global_average_pooling_2d: - case xnn_node_type_global_sum_pooling_2d: - case xnn_node_type_max_pooling_2d: - case xnn_node_type_rope: - case xnn_node_type_softmax: - case xnn_node_type_space_to_depth_2d: - case xnn_node_type_static_constant_pad: - case xnn_node_type_static_mean: - case xnn_node_type_static_mean_squared: - case xnn_node_type_static_reduce_max: - case xnn_node_type_static_reduce_min: - case xnn_node_type_static_reshape: - case xnn_node_type_static_resize_bilinear_2d: - case xnn_node_type_static_slice: - case xnn_node_type_static_sum: - case xnn_node_type_static_sum_squared: - case xnn_node_type_static_transpose: - case xnn_node_type_unary_elementwise: - break; - case xnn_node_type_pack_lh: - if (xnn_init_x16_pack_lh_config() != NULL) { - break; - } - XNN_FALLTHROUGH - default: - xnn_log_warning("FP16 rewrite aborted: node #%" PRIu32 - " (%s) is not supported for FP16 inference", - n, xnn_node_type_to_string(node->type)); - return false; - } - } - - // Annotate Values to be converted to FP16 as FP16-compatible. - // Note that static weights in [Depthwise] Convolution, Fully Connected Nodes - // remain FP32, they will be converted to FP16 during weight repacking when - // the operator is created. - for (uint32_t n = 0; n < subgraph->num_nodes; n++) { - struct xnn_node* node = &subgraph->nodes[n]; - switch (node->type) { - case xnn_node_type_deconvolution_2d: - case xnn_node_type_depthwise_convolution_2d: - if (subgraph->values[node->inputs[0]].datatype == xnn_datatype_fp32) { - subgraph->values[node->inputs[0]].fp16_rewrite.fp16_compatible = true; - } - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - break; - case xnn_node_type_convolution_2d: - if (subgraph->values[node->inputs[0]].datatype == xnn_datatype_qdint8) { - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - } else { - subgraph->values[node->inputs[0]].fp16_rewrite.fp16_compatible = true; - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - } - break; - case xnn_node_type_fully_connected: - if (subgraph->values[node->inputs[0]].datatype == xnn_datatype_qdint8 || - subgraph->values[node->inputs[0]].datatype == - xnn_datatype_qduint8 || - subgraph->values[node->inputs[0]].datatype == xnn_datatype_qpint8) { - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - } else if (subgraph->values[node->inputs[0]].datatype == - xnn_datatype_fp32 && - (node->packed_input_datatype == xnn_datatype_qdint8 || - node->packed_input_datatype == xnn_datatype_qduint8 || - node->packed_input_datatype == xnn_datatype_qpint8)) { - subgraph->values[node->inputs[0]].fp16_rewrite.fp16_compatible = true; - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - } else if ((subgraph->values[node->inputs[0]].datatype == - xnn_datatype_fp32 || - subgraph->values[node->inputs[0]].datatype == - xnn_datatype_pfp32) && - (subgraph->values[node->inputs[1]].datatype == - xnn_datatype_fp16 || - subgraph->values[node->inputs[1]].datatype == - xnn_datatype_fp32) && - subgraph->values[node->outputs[0]].datatype == - xnn_datatype_fp32) { - subgraph->values[node->inputs[0]].fp16_rewrite.fp16_compatible = true; - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - if (subgraph->values[node->inputs[1]].datatype == xnn_datatype_fp32) { - subgraph->values[node->inputs[1]].fp16_rewrite.fp16_compatible = true; - } - if (node->num_inputs > 2 && - subgraph->values[node->inputs[2]].datatype == xnn_datatype_fp32) { - subgraph->values[node->inputs[2]].fp16_rewrite.fp16_compatible = true; - } - } else if (all_values_fp32_or_pfp32(subgraph, node)) { - subgraph->values[node->inputs[0]].fp16_rewrite.fp16_compatible = true; - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - } else { - xnn_log_warning( - "FP16 rewrite aborted: node #%" PRIu32 - " (%s). Invalid compute type (input=%s, weights=%s, output=%s)", - n, xnn_node_type_to_string(node->type), - xnn_datatype_to_string( - subgraph->values[node->inputs[0]].datatype), - xnn_datatype_to_string( - subgraph->values[node->inputs[1]].datatype), - xnn_datatype_to_string( - subgraph->values[node->outputs[0]].datatype)); - return false; - } - break; - case xnn_node_type_convert: - if (subgraph->values[node->inputs[0]].datatype == xnn_datatype_fp32) { - subgraph->values[node->inputs[0]].fp16_rewrite.fp16_compatible = true; - } - if (subgraph->values[node->outputs[0]].datatype == xnn_datatype_fp32) { - subgraph->values[node->outputs[0]].fp16_rewrite.fp16_compatible = true; - } - break; - case xnn_node_type_pack_lh: - if (subgraph->values[node->inputs[0]].datatype == xnn_datatype_fp32) { - subgraph->values[node->inputs[0]].fp16_rewrite.fp16_compatible = true; - } - break; - default: - for (uint32_t i = 0; i < node->num_inputs; i++) { - switch (subgraph->values[node->inputs[i]].datatype) { - case xnn_datatype_fp32: - case xnn_datatype_pfp32: - subgraph->values[node->inputs[i]].fp16_rewrite.fp16_compatible = true; - break; - default: - break; - } - } - for (uint32_t o = 0; o < node->num_outputs; o++) { - switch (subgraph->values[node->outputs[o]].datatype) { - case xnn_datatype_fp32: - case xnn_datatype_pfp32: - subgraph->values[node->outputs[o]].fp16_rewrite.fp16_compatible = true; - break; - default: - break; - } - } - break; - } - } - - // Attempt to allocate memory for static values and external input/outputs. - // The FP16 rewrite is cleanly aborted on failure. - for (uint32_t n = 0; n < num_original_values; n++) { - struct xnn_value* value = &subgraph->values[n]; - value->fp16_rewrite.fp16_id = XNN_INVALID_VALUE_ID; - value->fp16_rewrite.fp32_id = XNN_INVALID_VALUE_ID; - if (value->fp16_rewrite.fp16_compatible) { - assert(value->datatype == xnn_datatype_fp32 || - value->datatype == xnn_datatype_pfp32); - if (xnn_value_is_static(value->allocation_type)) { - assert(value->producer == XNN_INVALID_NODE_ID); - const size_t fp16_size = - xnn_tensor_get_size(value) / 2 + XNN_EXTRA_BYTES; - value->fp16_rewrite.fp16_temp_data = xnn_allocate_zero_memory(fp16_size); - if (value->fp16_rewrite.fp16_temp_data == NULL) { - xnn_log_error("failed to allocate %zu bytes for fp16 tensor data", - (size_t)fp16_size); - goto error; - } - } else if (xnn_value_is_external(value->flags)) { - struct xnn_value* fp16_value = - xnn_subgraph_new_internal_value(subgraph); - if (fp16_value == NULL) { - xnn_log_error( - "FP16 rewrite aborted: failed to allocate value for external " - "input/output"); - goto error; - } else { - // Recompute value due to potential reallocation in - // xnn_subgraph_new_internal_value - value = &subgraph->values[n]; - xnn_value_copy(fp16_value, value); - switch (value->datatype) { - case xnn_datatype_fp32: - fp16_value->datatype = xnn_datatype_fp16; - break; - case xnn_datatype_pfp32: - fp16_value->datatype = xnn_datatype_pfp16; - break; - default: - XNN_UNREACHABLE; - } - // Clear external input/output flags - fp16_value->flags = 0; - fp16_value->producer = XNN_INVALID_NODE_ID; - fp16_value->first_consumer = XNN_INVALID_NODE_ID; - fp16_value->num_consumers = 0; - fp16_value->fp16_rewrite.fp16_id = XNN_INVALID_VALUE_ID; - fp16_value->fp16_rewrite.fp32_id = value->id; - fp16_value->allocation_type = xnn_allocation_type_workspace; - value->fp16_rewrite.fp16_id = fp16_value->id; - } - } else if (xnn_value_is_internal(value)) { - // fp16 tensors only need half the memory of fp32 tensors. - value->size /= 2; - } - } - } - - // Count the number of external inputs and outputs which require Convert nodes - uint32_t num_external_inputs = 0; - uint32_t num_external_outputs = 0; - for (uint32_t n = 0; n < subgraph->num_nodes; n++) { - const struct xnn_node* node = &subgraph->nodes[n]; - for (uint32_t i = 0; i < node->num_inputs; i++) { - if (is_repeated_input(node, i)) { - continue; - } - const struct xnn_value* value = &subgraph->values[node->inputs[i]]; - if (value->fp16_rewrite.fp16_id != XNN_INVALID_VALUE_ID && - value->first_consumer == n) { - assert(value->data == NULL); - assert(value->datatype == xnn_datatype_fp32); - assert(subgraph->values[value->fp16_rewrite.fp16_id].datatype == xnn_datatype_fp16); - // This value isn't always an external input, it could be an external - // output of the current subgraph (due to partition), and be - // simultaneously consumed by the current node. - if (xnn_value_is_external_input(value->flags)) { - num_external_inputs += 1; - } - } - } - for (uint32_t o = 0; o < node->num_outputs; o++) { - const struct xnn_value* value = &subgraph->values[node->outputs[o]]; - if (value->fp16_rewrite.fp16_id != XNN_INVALID_VALUE_ID) { - assert(value->datatype == xnn_datatype_fp32); - assert(subgraph->values[value->fp16_rewrite.fp16_id].datatype == xnn_datatype_fp16); - assert(xnn_value_is_external_output(value->flags)); - num_external_outputs += 1; - } - } - } - xnn_log_debug("Discovered %" PRIu32 " external inputs and %" PRIu32 - " external outputs", - num_external_inputs, num_external_outputs); - - // Attempt to allocate memory for the Convert nodes. - const uint32_t num_original_nodes = subgraph->num_nodes; - if (xnn_subgraph_add_nodes(subgraph, - num_external_inputs + num_external_outputs) != - xnn_status_success) { - xnn_log_error( - "FP16 rewrite aborted: failed to allocate node for external " - "input/output"); - goto error; - } - - // From this point the subgraph and tensor data get mutated, clean failure is - // no longer an option. - - // Replace FP32 Values in Nodes' inputs/outputs with FP16 Values. - // - FP32 values of static tensors get converted in a new data buffer. - // - For external inputs and outputs we create same-shaped FP16 Values and use - // those instead. - // - Values that are neither static nor external are converted to FP16 - // in-place - for (uint32_t n = 0; n < num_original_values; n++) { - struct xnn_value* value = &subgraph->values[n]; - if (value->fp16_rewrite.fp16_compatible) { - if (xnn_value_is_static(value->allocation_type)) { - assert(value->datatype == xnn_datatype_fp32); - const size_t num_elements = xnn_shape_multiply_all_dims(&value->shape); - xnn_run_unary_elementwise_nc( - xnn_unary_convert, xnn_datatype_fp32, xnn_datatype_fp16, - /*params=*/NULL, /*input_quantization=*/NULL, - /*output_quantization=*/NULL, 0, num_elements, 1, 1, 1, NULL, - value->data, value->fp16_rewrite.fp16_temp_data); - // Remember pointer to the original fp32 data, nodes like convolution - // need fp32 weights/biases. - value->fp32_data = value->data; - value->data = value->fp16_rewrite.fp16_temp_data; - value->fp16_rewrite.fp16_temp_data = NULL; - value->datatype = xnn_datatype_fp16; - xnn_log_debug("FP16 rewrite: converted static FP32 tensor #%" PRIu32 - " to FP16 in new buffer", - n); - } else if (xnn_value_is_external(value->flags)) { - assert(value->datatype == xnn_datatype_fp32); - assert(value->fp16_rewrite.fp16_id != XNN_INVALID_VALUE_ID); - value->producer = XNN_INVALID_NODE_ID; - value->num_consumers = 0; - xnn_log_debug("FP16 rewrite: created FP16 tensor #%" PRIu32 - " for external FP32 tensor #%" PRIu32, - subgraph->values[value->fp16_rewrite.fp16_id].id, n); - } else { - switch (value->datatype) { - case xnn_datatype_fp32: - xnn_log_debug( - "FP16 rewrite: converted FP32 tensor #%" PRIu32 " to FP16", n); - value->datatype = xnn_datatype_fp16; - break; - case xnn_datatype_pfp32: - xnn_log_debug("FP16 rewrite: converted PFP32 tensor #%" PRIu32 - " to PFP16", - n); - value->datatype = xnn_datatype_pfp16; - break; - default: - XNN_UNREACHABLE; - } - } - } - } - - // Switch the nodes consuming/generated converted `fp32` inputs/outputs to - // their `fp16` values. - for (uint32_t n = 0; n < subgraph->num_nodes; n++) { - struct xnn_node* node = &subgraph->nodes[n]; - if (node->type == xnn_node_type_invalid) { - // Node was fused away, skip. - continue; - } - - // Fix up anything node-type specific. - switch (node->type) { - case xnn_node_type_static_constant_pad: - node->params.static_pad.padding_value = fp16_ieee_from_fp32_value( - uint32_as_float(node->params.static_pad.padding_value)); - break; - case xnn_node_type_batch_matrix_multiply: - case xnn_node_type_fully_connected: { - // Patch up any LHS packing of fully-connected nodes, if needed. - if (node->flags & XNN_FLAG_INLINE_LHS_PACKING) { - switch (node->packed_input_datatype) { - case xnn_datatype_pfp32: - // Switch from packed `fp32` to packed `fp16`. - node->packed_input_datatype = xnn_datatype_pfp16; - break; - case xnn_datatype_qpint8: - // Convert from `qpint8` back to `qdint8` since we don't have a - // `qpint8` packing function for `f16` inputs. - node->packed_input_datatype = xnn_datatype_qdint8; - break; - default: - break; - } - } else if (subgraph->values[node->inputs[0]].datatype == - xnn_datatype_qpint8) { - subgraph->values[node->inputs[0]].datatype = xnn_datatype_qdint8; - } - } break; - default: - break; - } - - for (uint32_t i = 0; i < node->num_inputs; i++) { - const uint32_t fp16_id = subgraph->values[node->inputs[i]].fp16_rewrite.fp16_id; - if (fp16_id != XNN_INVALID_VALUE_ID) { - struct xnn_value* fp16_value = &subgraph->values[fp16_id]; - assert(fp16_value->fp16_rewrite.fp32_id == node->inputs[i]); - if (fp16_value->first_consumer == XNN_INVALID_NODE_ID) { - fp16_value->first_consumer = n; - } - node->inputs[i] = fp16_id; - if (!is_repeated_input(node, i)) { - fp16_value->num_consumers++; - } - } - } - for (uint32_t o = 0; o < node->num_outputs; o++) { - const uint32_t fp32_id = node->outputs[o]; - const uint32_t fp16_id = subgraph->values[fp32_id].fp16_rewrite.fp16_id; - if (fp16_id != XNN_INVALID_VALUE_ID) { - struct xnn_value* fp16_value = &subgraph->values[fp16_id]; - if (fp16_value->first_consumer == XNN_INVALID_NODE_ID && - fp16_value->producer == XNN_INVALID_NODE_ID) { - assert(fp16_value->fp16_rewrite.fp32_id == fp32_id); - } else { - // Prevent double assignments by creating a new copy of the output - // value if it has already been written to. - fp16_value = xnn_subgraph_new_internal_value(subgraph); - xnn_value_copy(fp16_value, &subgraph->values[fp16_id]); - fp16_value->first_consumer = XNN_INVALID_NODE_ID; - fp16_value->num_consumers = 0; - subgraph->values[fp32_id].fp16_rewrite.fp16_id = fp16_value->id; - } - node->outputs[o] = fp16_value->id; - fp16_value->producer = n; - } - } - } - - struct xnn_node* output_node = &subgraph->nodes[subgraph->num_nodes - 1]; - for (uint32_t n = num_original_nodes; n != 0; n--) { - const struct xnn_node* node = &subgraph->nodes[n - 1]; - // Insert Convert nodes for outputs - for (uint32_t o = 0; o < node->num_outputs; o++) { - const struct xnn_value* value = &subgraph->values[node->outputs[o]]; - const uint32_t fp32_id = value->fp16_rewrite.fp32_id; - if (fp32_id != XNN_INVALID_VALUE_ID && - subgraph->values[fp32_id].fp16_rewrite.fp16_id == value->id) { - xnn_log_debug("Inserted FP16->FP32 Convert Node from tensor #%" PRIu32 - " to output tensor #%" PRIu32, - value->id, fp32_id); - const uint32_t output_node_id = output_node->id; - assert(output_node >= subgraph->nodes); - xnn_node_clear(output_node); - output_node->id = output_node_id; - xnn_init_convert_node(output_node, value->id, fp32_id, 0 /* flags */); - output_node -= 1; - } - } - // Move the Node to the new location - if (output_node != node) { - const uint32_t output_node_id = output_node->id; - assert(output_node >= subgraph->nodes); - memcpy(output_node, node, sizeof(struct xnn_node)); - output_node->id = output_node_id; - output_node -= 1; - } - // Insert Convert nodes for inputs - for (uint32_t i = 0; i < node->num_inputs; i++) { - if (is_repeated_input(node, i)) { - continue; - } - const struct xnn_value* value = &subgraph->values[node->inputs[i]]; - const uint32_t fp32_id = value->fp16_rewrite.fp32_id; - if (fp32_id != XNN_INVALID_VALUE_ID && - subgraph->values[fp32_id].first_consumer == n - 1) { - // Only insert convert nodes if the value actually is an external input. - // This value could be an external output, if that's the case, we have - // already inserted a convert node in loop above for outputs. - if (xnn_value_is_external_input(subgraph->values[fp32_id].flags)) { - xnn_log_debug("Inserted FP32->FP16 Convert Node from tensor #%" PRIu32 - " to tensor #%" PRIu32, - fp32_id, value->id); - const uint32_t output_node_id = output_node->id; - assert(output_node >= subgraph->nodes); - xnn_node_clear(output_node); - output_node->id = output_node_id; - xnn_init_convert_node(output_node, fp32_id, value->id, 0 /* flags */); - output_node -= 1; - } - } - } - } - - xnn_log_info("XNNPACK has switched to FP16 inference mode!"); - - return true; - -error: - for (uint32_t n = 0; n < subgraph->num_values; n++) { - struct xnn_value* value = &subgraph->values[n]; - // Deallocate extra memory used during static tensor rewrite. - if (value->fp16_rewrite.fp16_temp_data != NULL) { - xnn_release_memory(value->fp16_rewrite.fp16_temp_data); - } - // Revert marking values as FP16-compatible, as xnn_delete_subgraph() may - // assume ownership of those that are. - value->fp16_rewrite.fp16_compatible = false; - } - - // Clear the fp16 values created for external inputs and outputs. - for (uint32_t n = num_original_values; n < subgraph->num_values; n++) { - xnn_value_clear(&subgraph->values[n]); - } - - return false; -} - static void xnn_node_replace_output(struct xnn_node* node, uint32_t old_output_id, uint32_t new_output_id) { @@ -4303,32 +3776,6 @@ enum xnn_status xnn_subgraph_optimize(xnn_subgraph_t subgraph, XNN_RETURN_IF_ERROR( xnn_subgraph_optimize_common_subgraphs(subgraph, optimization_flags)); - if ((optimization_flags & XNN_FLAG_FORCE_FP16_INFERENCE) && - (!xnn_is_f16_compatible_config(hardware_config))) { - xnn_log_error( - "failed to force FP16 inference: hardware supports neither native nor " - "emulated FP16 operators"); - return xnn_status_unsupported_hardware; - } - const bool try_native_fp16 = - (optimization_flags & XNN_FLAG_HINT_FP16_INFERENCE) && - xnn_is_f16_supported_natively(hardware_config); - const bool force_fp16 = (optimization_flags & XNN_FLAG_FORCE_FP16_INFERENCE); - if (try_native_fp16 || force_fp16) { - const bool fp16_rewrite_succeeded = xnn_subgraph_rewrite_for_fp16(subgraph); - if (force_fp16 && !fp16_rewrite_succeeded) { - xnn_log_error( - "failed to force FP16 inference: subgraph is incompatible with FP16 " - "operators"); - return xnn_status_unsupported_parameter; - } - if (fp16_rewrite_succeeded) { - // Re-run xnn_subgraph_analyze_consumers_and_producers since fp16 re-write - // inserts nodes and changes producers/consumers. - xnn_subgraph_analyze_consumers_and_producers(subgraph); - } - } - #if XNN_ENABLE_SPARSE if ((optimization_flags & XNN_FLAG_HINT_SPARSE_INFERENCE) && (xnn_is_chw_compatible_config(hardware_config))) { @@ -4372,18 +3819,6 @@ enum xnn_status xnn_delete_subgraph(xnn_subgraph_t subgraph) { } if (subgraph->values != NULL) { - // Release the dynamic allocations created during FP16 rewrite, if the - // subgraph still has ownership of them. - for (uint32_t i = 0; i < subgraph->num_values; i++) { - struct xnn_value* value = &subgraph->values[i]; - if (value->fp16_rewrite.fp16_compatible && value->data != NULL) { - XNN_PRAGMA_CLANG("clang diagnostic push") - XNN_PRAGMA_CLANG("clang diagnostic ignored \"-Wcast-qual\"") - xnn_release_memory((void*)value->data); - XNN_PRAGMA_CLANG("clang diagnostic pop") - } - } - memset(subgraph->values, 0, sizeof(struct xnn_value) * subgraph->num_values); xnn_release_memory(subgraph->values); diff --git a/src/subgraph/subgraph-utils.c b/src/subgraph/subgraph-utils.c index 73f2b1d0467..6f8d45408c6 100644 --- a/src/subgraph/subgraph-utils.c +++ b/src/subgraph/subgraph-utils.c @@ -212,20 +212,13 @@ void xnn_subgraph_log_impl(const char* filename, size_t line_number, if (value->first_consumer != XNN_INVALID_NODE_ID) { fprintf(out, ", first_consumer=%u", value->first_consumer); } - if (value->fp16_rewrite.fp16_compatible && value->fp16_rewrite.fp16_id != XNN_INVALID_VALUE_ID) { - fprintf(out, ", fp16_rewrite.fp16_id=%u", value->fp16_rewrite.fp16_id); - } - if (value->fp16_rewrite.fp16_compatible && value->fp16_rewrite.fp32_id != XNN_INVALID_VALUE_ID) { - fprintf(out, ", fp16_rewrite.fp32_id=%u", value->fp16_rewrite.fp32_id); - } if (value->flags & ~(XNN_VALUE_FLAG_EXTERNAL_INPUT | XNN_VALUE_FLAG_EXTERNAL_OUTPUT)) { fprintf(out, ", flags="); XNN_PRINT_FLAGS( value->flags, XNN_FLAG_SQUASH_GROUPS, XNN_VALUE_FLAG_ONE_CONSUMER, - XNN_VALUE_FLAG_FP16_COMPATIBLE, XNN_VALUE_FLAG_LAYOUT_NCHW, - XNN_VALUE_FLAG_SHAPE_IS_STATIC, XNN_VALUE_FLAG_IS_ZERO, - XNN_VALUE_FLAG_IS_ONE); + XNN_VALUE_FLAG_LAYOUT_NCHW, XNN_VALUE_FLAG_SHAPE_IS_STATIC, + XNN_VALUE_FLAG_IS_ZERO, XNN_VALUE_FLAG_IS_ONE); } fprintf(out, ".\n"); } diff --git a/src/tensor.c b/src/tensor.c index df6de4bb4d6..ebba995c5a1 100644 --- a/src/tensor.c +++ b/src/tensor.c @@ -9,7 +9,6 @@ #include #include #include -#include #include #include "include/xnnpack.h" diff --git a/src/xnnpack/subgraph.h b/src/xnnpack/subgraph.h index d35562f2131..4cb0a74f9bd 100644 --- a/src/xnnpack/subgraph.h +++ b/src/xnnpack/subgraph.h @@ -41,11 +41,10 @@ /// Assume tensors of rank > 2 will be squashed to 2 dimensions. #define XNN_FLAG_SQUASH_GROUPS 0x00000100 #define XNN_VALUE_FLAG_ONE_CONSUMER 0x00000200 -#define XNN_VALUE_FLAG_FP16_COMPATIBLE 0x00000400 -#define XNN_VALUE_FLAG_LAYOUT_NCHW 0x00000800 -#define XNN_VALUE_FLAG_SHAPE_IS_STATIC 0x00001000 -#define XNN_VALUE_FLAG_IS_ZERO 0x00002000 -#define XNN_VALUE_FLAG_IS_ONE 0x00004000 +#define XNN_VALUE_FLAG_LAYOUT_NCHW 0x00000400 +#define XNN_VALUE_FLAG_SHAPE_IS_STATIC 0x00000800 +#define XNN_VALUE_FLAG_IS_ZERO 0x00001000 +#define XNN_VALUE_FLAG_IS_ONE 0x00002000 /// Create explicit `pack-lh` nodes, instead of pack the data on the fly /// in a temporary buffer in the consuming op. Inline packing reduces memory @@ -164,19 +163,6 @@ struct xnn_value { uint32_t num_consumers; uint32_t num_nchw_compatible_consumers; enum xnn_layout_type layout; - - /// Set during analysis in xnn_subgraph_rewrite_for_fp16. - struct rewrite_for_fp16 { - /// Indicates that this value should be converted to FP16. - bool fp16_compatible; - /// Indicates Value ID of the FP16 variant of this Value. - uint32_t fp16_id; - /// Indicates Value ID of the FP32 variant of this Value. - uint32_t fp32_id; - /// Temporary buffer to convert static data to FP16. - void* fp16_temp_data; - } fp16_rewrite; - // Pointer to a `xnn_gemm_config` if this value is packed for a specific GEMM. const struct xnn_gemm_config* gemm_config; // Pointer to original fp32 data if this value was converted from fp32 to fp16 @@ -640,8 +626,6 @@ enum xnn_status xnn_subgraph_rewrite_for_row_sum(xnn_subgraph_t subgraph); enum xnn_status xnn_subgraph_optimize(xnn_subgraph_t subgraph, uint32_t flags); void xnn_subgraph_rewrite_for_nchw(xnn_subgraph_t subgraph); -// Rewrites subgraph for FP16, returns true if success, false if rewrite failed. -bool xnn_subgraph_rewrite_for_fp16(xnn_subgraph_t subgraph); void xnn_node_clear(struct xnn_node* node); void xnn_node_copy(struct xnn_node* dst_node, const struct xnn_node* src_node); diff --git a/test/subgraph/BUILD b/test/subgraph/BUILD index 8ae95344ba5..eb3d533c809 100644 --- a/test/subgraph/BUILD +++ b/test/subgraph/BUILD @@ -99,6 +99,7 @@ xnnpack_cxx_library( deps = xnnpack_test_deps_for_library() + [ ":runtime_flags", ":subgraph_tester", + "//:buffer", "//:subgraph_h", "//:xnnpack_h", ], @@ -325,31 +326,6 @@ xnnpack_unit_test( ], ) -xnnpack_unit_test( - name = "subgraph_fp16_test", - srcs = [ - "mock-allocator.h", - "subgraph-fp16.cc", - ], - tags = ["no_ynnpack"], - deps = [ - ":runtime_flags", - ":runtime_tester", - ":subgraph_tester", - "//:allocation_type", - "//:allocator", - "//:buffer", - "//:math", - "//:node_type", - "//:operator_h", - "//:params", - "//:subgraph", - "//:subgraph_h", - "//:xnnpack_h", - "//test:replicable_random_device", - ], -) - xnnpack_unit_test( name = "stencil_test", srcs = ["stencil.cc"], diff --git a/test/subgraph/CMakeLists.txt b/test/subgraph/CMakeLists.txt index da8aa50d417..cf346ee2b26 100644 --- a/test/subgraph/CMakeLists.txt +++ b/test/subgraph/CMakeLists.txt @@ -23,7 +23,6 @@ IF(XNNPACK_BUILD_LIBRARY) fusion input-output memory-planner - subgraph-fp16 subgraph runtime subgraph-nchw diff --git a/test/subgraph/subgraph-fp16.cc b/test/subgraph/subgraph-fp16.cc deleted file mode 100644 index 6399b4bf605..00000000000 --- a/test/subgraph/subgraph-fp16.cc +++ /dev/null @@ -1,1408 +0,0 @@ -// Copyright 2022 Google LLC -// -// This source code is licensed under the BSD-style license found in the -// LICENSE file in the root directory of this source tree. - -#include -#include -#include -#include -#include -#include -#include -#include -#include - -#include -#include -#include "include/xnnpack.h" -#include "src/xnnpack/allocation-type.h" -#include "src/xnnpack/buffer.h" -#include "src/xnnpack/math.h" -#include "src/xnnpack/node-type.h" -#include "src/xnnpack/operator.h" -#include "src/xnnpack/subgraph.h" -#include "test/replicable_random_device.h" -#include "test/subgraph/mock-allocator.h" -#include "test/subgraph/runtime-flags.h" -#include "test/subgraph/runtime-tester.h" -#include "test/subgraph/subgraph-tester.h" - -namespace xnnpack { - -using ::testing::_; -using ::testing::AnyNumber; -using ::testing::Return; - -TEST(SUBGRAPH_FP16, fully_connected_f16_weights_and_biases) { - SubgraphTester tester(4); - // external input[0] static f16[1 + 2] - // \ / - // \ / - // [fully_connected] - // | - // external - // output[3] - std::vector weights(3 * 4); - std::vector biases(4); - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddStaticTensorF16({3, 4}, 1, weights.data()) - .AddStaticTensorF16({4}, 2, biases.data()) - .AddOutputTensorF32({1, 2, 2, 4}, 3) - .AddFullyConnected(0, 1, 2, 3, 0) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: - // - // external input[0] - // | - // [convert]* - // | - // input[4] static f16[1 + 2] - // \ / - // \ / - // [fully_connected] - // | - // fp16 value[5]* - // | - // [convert]* - // | - // external - // output[3] - - // We should have 2 convert nodes, one for external input, 1 for external - // output, so 3 in total, including the fully-connected in the original graph. - ASSERT_EQ(tester.NumNodes(), 3); - - const xnn_node* input_convert_node = tester.Node(0); - ASSERT_EQ(input_convert_node->type, xnn_node_type_convert); - ASSERT_EQ(tester.Value(4)->datatype, xnn_datatype_fp16); - const xnn_node* output_convert_node = tester.Node(2); - ASSERT_EQ(output_convert_node->type, xnn_node_type_convert); - ASSERT_EQ(tester.Value(5)->datatype, xnn_datatype_fp16); - - // Check that the weights and biases are still `f16`. - ASSERT_EQ(tester.Value(1)->datatype, xnn_datatype_fp16); - ASSERT_EQ(tester.Value(2)->datatype, xnn_datatype_fp16); - - // Check that Fully-Connected node refers to the FP16 value before conversion. - const xnn_node* fully_connected_node = tester.Node(1); - ASSERT_EQ(fully_connected_node->type, xnn_node_type_fully_connected); - ASSERT_EQ(fully_connected_node->inputs[0], 4); - ASSERT_EQ(fully_connected_node->inputs[1], 1); - ASSERT_EQ(fully_connected_node->inputs[2], 2); - - // Check that the output type is `fp32`. - ASSERT_EQ(tester.Value(3)->datatype, xnn_datatype_fp32); -} - -TEST(SUBGRAPH_FP16, fully_connected_f16_weights_f32_biases) { - SubgraphTester tester(4); - // external input[0] static f16[1] + f32[2] - // \ / - // \ / - // [fully_connected] - // | - // external - // output[3] - std::vector weights(3 * 4); - std::vector biases(4); - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddStaticTensorF16({3, 4}, 1, weights.data()) - .AddStaticTensorF32({4}, 2, biases.data()) - .AddOutputTensorF32({1, 2, 2, 4}, 3) - .AddFullyConnected(0, 1, 2, 3, 0) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: - // - // external input[0] - // | - // [convert]* - // | - // input[4] static f16[1] + f16[2] (converted) - // \ / - // \ / - // [fully_connected] - // | - // fp16 value[5]* - // | - // [convert]* - // | - // external - // output[3] - - // We should have 2 convert nodes, two for external inputs, 1 for external - // output, so 3 in total, including the fully-connected in the original graph. - ASSERT_EQ(tester.NumNodes(), 3); - - const xnn_node* input_convert_node = tester.Node(0); - ASSERT_EQ(input_convert_node->type, xnn_node_type_convert); - ASSERT_EQ(tester.Value(4)->datatype, xnn_datatype_fp16); - const xnn_node* output_convert_node = tester.Node(2); - ASSERT_EQ(output_convert_node->type, xnn_node_type_convert); - ASSERT_EQ(tester.Value(5)->datatype, xnn_datatype_fp16); - - // Check that the weights and biases are now both `f16`, as the bias was - // converted statically. - ASSERT_EQ(tester.Value(1)->datatype, xnn_datatype_fp16); - ASSERT_EQ(tester.Value(2)->datatype, xnn_datatype_fp16); - - // Check that Fully-Connected node refers to the FP16 value before conversion. - const xnn_node* fully_connected_node = tester.Node(1); - ASSERT_EQ(fully_connected_node->type, xnn_node_type_fully_connected); - ASSERT_EQ(fully_connected_node->inputs[0], 4); - ASSERT_EQ(fully_connected_node->inputs[1], 1); - ASSERT_EQ(fully_connected_node->inputs[2], 2); - - // Check that the output type is `fp32`. - ASSERT_EQ(tester.Value(3)->datatype, xnn_datatype_fp32); -} - -TEST(SUBGRAPH_FP16, fully_connected_f16_weights_no_biases) { - SubgraphTester tester(4); - // external input[0] static f16[12] - // \ / - // \ / - // [fully_connected] - // | - // external - // output[2] - std::vector weights(3 * 4); - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddStaticTensorF16({3, 4}, 1, weights.data()) - .AddOutputTensorF32({1, 2, 2, 4}, 2) - .AddFullyConnected(0, 1, XNN_INVALID_VALUE_ID, 2, 0) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: - // - // external input[0] - // | - // [convert]* - // | - // input[3] static f16[1] - // \ / - // \ / - // [fully_connected] - // | - // fp16 value[4]* - // | - // [convert]* - // | - // external - // output[2] - - // We should have 2 convert nodes, one for external input, 1 for external - // output, so 5 in total, including the fully-connected in the original graph. - ASSERT_EQ(tester.NumNodes(), 3); - - const xnn_node* input_convert_node = tester.Node(0); - ASSERT_EQ(input_convert_node->type, xnn_node_type_convert); - ASSERT_EQ(tester.Value(4)->datatype, xnn_datatype_fp16); - const xnn_node* output_convert_node = tester.Node(2); - ASSERT_EQ(output_convert_node->type, xnn_node_type_convert); - ASSERT_EQ(tester.Value(5)->datatype, xnn_datatype_fp16); - - // Check that Fully-Connected node refers to the FP16 value before conversion. - const xnn_node* fully_connected_node = tester.Node(1); - ASSERT_EQ(fully_connected_node->type, xnn_node_type_fully_connected); - ASSERT_EQ(fully_connected_node->inputs[0], 4); - ASSERT_EQ(fully_connected_node->inputs[1], 1); - - // Check that the output type is `fp32`. - ASSERT_EQ(tester.Value(2)->datatype, xnn_datatype_fp32); -} - -TEST(SUBGRAPH_FP16, value_both_external_output_and_input) { - SubgraphTester tester(4); - std::array pre_paddings = {0, 1, 0, 0}; - std::array post_paddings = {0, 1, 0, 0}; - // external input[0] - // / - // [constant pad] - // / - // external dynamic[1] - // output[2] / - // \ / - // [add] - // | - // external - // output[3] - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddDynamicTensorF32({1, 1, 1, 3}, 1) - .AddOutputTensorF32({1, 4, 2, 3}, 2) - .AddOutputTensorF32({1, 4, 2, 3}, 3) - .AddConstantPad(pre_paddings.data(), post_paddings.data(), 0.0f, 0, 2) - .AddAddition(2, 1, 3) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: - // - // external input[0] - // | - // [convert]* - // | - // input[4]* - // / - // [constant pad] - // / - // fp16 value[5]* - // | \ - // [convert]* \ - // | \ - // external \ dynamic[1] converted in-place - // output[2] \ / - // \ / - // [add] - // | - // fp16 value[6]* - // | - // [convert]* - // | - // external - // output[3] - - // We should have 3 convert nodes, one for external input, 2 for external - // outputs, so 5 in total, including the pad and add in the original graph. - ASSERT_EQ(tester.NumNodes(), 5); - - const xnn_node* output_convert_node = tester.Node(4); - ASSERT_EQ(output_convert_node->type, xnn_node_type_convert); - - // Check that Addition node refers to the FP16 value before conversion. - const xnn_node* addition_node = tester.Node(3); - ASSERT_EQ(addition_node->type, xnn_node_type_binary_elementwise); - ASSERT_EQ(addition_node->binary_operator, xnn_binary_add); - ASSERT_EQ(addition_node->inputs[0], 5); - ASSERT_EQ(addition_node->inputs[1], 1); - ASSERT_EQ(tester.Value(5)->datatype, xnn_datatype_fp16); - ASSERT_EQ(tester.Value(1)->datatype, xnn_datatype_fp16); - - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_static_constant_pad); - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); -} - -TEST(SUBGRAPH_FP16, with_static_value) { - SubgraphTester tester(3); - float static_tensor_data[3 + XNN_EXTRA_BYTES / sizeof(float)] = {1.0f, 2.0f, - 3.0f}; - // external input[0] static[1] - // \ / - // \ / - // [add] - // | - // external - // output[2] - tester - .AddInputTensorF32({1, 2, 2, 3}, 0) - // Tensor #1 is both static and external - .AddStaticTensorF32({1, 1, 1, 3}, TensorType::kDense, 1, - /*flags=*/XNN_VALUE_FLAG_EXTERNAL_INPUT, - static_tensor_data) - .AddOutputTensorF32({1, 4, 2, 3}, 2) - .AddAddition(0, 1, 2) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static tensor data has - // been converted into a new buffer. - // - // external input[0] - // | - // [convert]* - // | - // input[3]* static[1]* (converted into new buffer) - // \ / - // \ / - // [add] - // | - // fp16 value[4]* - // | - // [convert]* - // | - // external - // output[2] - - // We should have 3 nodes, the original add node, plus one convert node for - // each of the external input and output. - ASSERT_EQ(tester.NumNodes(), 3); - - // The static value should be converted to FP16 - const xnn_value* static_value = tester.Value(1); - ASSERT_EQ(static_value->datatype, xnn_datatype_fp16); - ASSERT_EQ(static_cast(static_value->data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->data)[1], 2.0f); - ASSERT_EQ(static_cast(static_value->data)[2], 3.0f); - - // Check that the output of convert is allocated in workspace. - const xnn_value* convert_out = tester.Value(3); - ASSERT_EQ(convert_out->allocation_type, xnn_allocation_type_workspace); - // Check that external input remains external (bug in runtime changed its - // allocation type. const xnn_value* input = tester.Value(0); - // ASSERT_EQ(input->allocation_type, xnn_allocation_type_external); -} - -TEST(SUBGRAPH_FP16, external_inputs_allocation_type_remains_external) { - // external input[0] static[1] - // \ / - // \ / - // [add] - // | - // external - // output[2] - RuntimeTester tester(3); - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddInputTensorF32({1, 2, 2, 3}, 1) - .AddOutputTensorF32({1, 2, 2, 3}, 2) - .AddAddition(0, 1, 2) - .Optimize() - .RewriteForFp16(); - - xnn_runtime_t runtime = tester.Runtime(); - xnn_status status = xnn_create_runtime_v3(tester.Subgraph(), nullptr, nullptr, - xnn_test_runtime_flags(), &runtime); - std::unique_ptr auto_runtime( - runtime, xnn_delete_runtime); - - if (status == xnn_status_unsupported_hardware) { - GTEST_SKIP(); - } - - // Check that both external inputs remain external inputs after rewriting - // for FP16. - ASSERT_EQ(tester.Value(0)->allocation_type, xnn_allocation_type_external); - ASSERT_EQ(tester.Value(1)->allocation_type, xnn_allocation_type_external); -} - -TEST(SUBGRAPH_FP16, static_buffer_allocation_failure) { - SubgraphTester tester(3); - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddStaticTensorF32({1, 1, 1, 3}, TensorType::kDense, 1, - /*flags=*/XNN_VALUE_FLAG_EXTERNAL_INPUT) - .AddOutputTensorF32({1, 4, 2, 3}, 2) - .AddAddition(0, 1, 2) - .Optimize(); - - MockAllocator mock_allocator; - std::unique_ptr - auto_mock_allocator(&mock_allocator, &RestoreDefaultAllocator); - SetUpMockAllocator(&mock_allocator); - - // Make the allocation of the static fp16 tensor buffer - // (of size 22 = 3 * 16bits + XNN_EXTRA_BYTES) fail. - EXPECT_CALL(mock_allocator, allocate(_, _)).Times(AnyNumber()); - EXPECT_CALL(mock_allocator, allocate(_, 22)).WillOnce(Return(nullptr)); - - tester.RewriteForFp16WithFailure(); -} - -TEST(SUBGRAPH_FP16, external_value_allocation_failure) { - SubgraphTester tester(3); - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddStaticTensorF32({1, 1, 1, 3}, TensorType::kDense, 1, - /*flags=*/XNN_VALUE_FLAG_EXTERNAL_INPUT) - .AddOutputTensorF32({1, 4, 2, 3}, 2) - .AddAddition(0, 1, 2) - .Optimize(); - - MockAllocator mock_allocator; - std::unique_ptr - auto_mock_allocator(&mock_allocator, &RestoreDefaultAllocator); - SetUpMockAllocator(&mock_allocator); - - // Make the allocation of the external values fail. - EXPECT_CALL(mock_allocator, reallocate(_, tester.Subgraph()->values, _)) - .WillOnce(Return(nullptr)); - - tester.RewriteForFp16WithFailure(); -} - -TEST(SUBGRAPH_FP16, convolution_weights_used_by_another_node) { - SubgraphTester tester(7); - - float static_filter_data[6 + XNN_EXTRA_BYTES / sizeof(float)] = { - 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, - }; - // external input[0] bias [2] static filter [1] external input [6] - // - // \ / / \ / - // \ / / \ / - // [convolution] [subtract] - // | | - // convolution out [3] subtract out [5] - const uint32_t input_id = 0; - const uint32_t filter_id = 1; - const uint32_t bias_id = 2; - const uint32_t convolution_out_id = 3; - const uint32_t out_id2 = 5; - const uint32_t subtract_input_id = 6; - tester.AddInputTensorF32({1, 5, 5, 3}, input_id) - .AddStaticTensorF32({2, 1, 1, 3}, TensorType::kDense, filter_id, - /*flags=*/0, static_filter_data) - .AddStaticTensorF32({2}, TensorType::kDense, bias_id) - .AddOutputTensorF32({1, 5, 5, 2}, convolution_out_id) - .AddInputTensorF32({1, 4, 2, 3}, subtract_input_id) - .AddOutputTensorF32({2, 1, 1, 3}, out_id2) - .AddConvolution2D(ConvolutionParams{Padding{0, 0, 0, 0}, Kernel{3, 3}, - Subsampling{1, 1}, Dilation{1, 1}, - /*groups=*/1, - /*group_input_channels=*/3, - /*group_output_channels*/ 2}, - input_id, filter_id, bias_id, convolution_out_id) - .AddSubtract(filter_id, subtract_input_id, out_id2) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static filter data has - // been converted into a new buffer. - // - // external input[0] bias [2] filter [1]* external input [6] - // \ / / \ / - // [convert]* / / \ [convert]* - // \ / / \ / - // \ / / \ / - // [convolution] [subtract] - // | | - // [convert]* [convert]* - // | | - // convolution out [3] subtract out [5] - - // We should have 6 nodes, the original convolution and subtraction node, a - // convert for the two external inputs, and a convert for the two external - // outputs. - ASSERT_EQ(tester.NumNodes(), 6); - - // The static value should be converted to FP16 - const xnn_value* static_value = tester.Value(filter_id); - ASSERT_EQ(static_value->datatype, xnn_datatype_fp16); - ASSERT_EQ(static_value->fp32_data, static_filter_data); - // Weights are converted to fp16. - ASSERT_EQ(static_cast(static_value->data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->data)[1], 2.0f); - ASSERT_EQ(static_cast(static_value->data)[2], 3.0f); - ASSERT_EQ(static_cast(static_value->data)[3], 4.0f); - ASSERT_EQ(static_cast(static_value->data)[4], 5.0f); - ASSERT_EQ(static_cast(static_value->data)[5], 6.0f); - // But original fp32 weights kept around. - ASSERT_EQ(static_cast(static_value->fp32_data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[1], 2.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[2], 3.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[3], 4.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[4], 5.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[5], 6.0f); -} - -TEST(SUBGRAPH_FP16, convolution_bias_used_by_another_node) { - SubgraphTester tester(7); - - float static_bias_data[2 + XNN_EXTRA_BYTES / sizeof(float)] = { - 1.0f, - 2.0f, - }; - // external input[0] bias [2] static filter [1] external input [6] - // - // \ / / \ / - // \ / / \ / - // [convolution] [subtract] - // | | - // convolution out [3] subtract out [5] - const uint32_t input_id = 0; - const uint32_t filter_id = 1; - const uint32_t bias_id = 2; - const uint32_t convolution_out_id = 3; - const uint32_t out_id2 = 5; - const uint32_t subtract_input_id = 6; - tester.AddInputTensorF32({1, 5, 5, 3}, input_id) - .AddStaticTensorF32({2, 1, 1, 3}, TensorType::kDense, filter_id) - .AddStaticTensorF32({2}, TensorType::kDense, bias_id, /*flags=*/0, - static_bias_data) - .AddOutputTensorF32({1, 5, 5, 2}, convolution_out_id) - .AddInputTensorF32({2}, subtract_input_id) - .AddOutputTensorF32({2}, out_id2) - .AddConvolution2D(ConvolutionParams{Padding{0, 0, 0, 0}, Kernel{3, 3}, - Subsampling{1, 1}, Dilation{1, 1}, - /*groups=*/1, - /*group_input_channels=*/3, - /*group_output_channels*/ 2}, - input_id, filter_id, bias_id, convolution_out_id) - .AddSubtract(bias_id, subtract_input_id, out_id2) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static bias data has - // been converted into a new buffer. - // - // external input[0] bias [2] filter [1]* external input [6] - // \ / / \ / - // [convert]* / / \ [convert]* - // \ / / \ / - // \ / / \ / - // [convolution] [subtract] - // | | - // [convert]* [convert]* - // | | - // convolution out [3] subtract out [5] - - // We should have 6 nodes, the original convolution and subtraction node, a - // convert for the two external inputs, and a convert for the two external - // outputs. - ASSERT_EQ(tester.NumNodes(), 6); - - // The static value should be converted to FP16 - const xnn_value* static_value = tester.Value(bias_id); - ASSERT_EQ(static_value->datatype, xnn_datatype_fp16); - ASSERT_EQ(static_value->fp32_data, static_bias_data); - // Weights are converted to fp16. - ASSERT_EQ(static_cast(static_value->data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->data)[1], 2.0f); - // But original fp32 weights kept around. - ASSERT_EQ(static_cast(static_value->fp32_data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[1], 2.0f); -} - -TEST(SUBGRAPH_FP16, fully_connected_qd8_f16_qc8w) { - SubgraphTester tester(5); - SubgraphTester reference_tester(5); - - int8_t static_filter_data[6 + XNN_EXTRA_BYTES / sizeof(int8_t)] = { - 1, 2, 3, -3, -2, -1, - }; - float bias[2 + XNN_EXTRA_BYTES / sizeof(float)] = {1, 2}; - float kernel_scale[2 + XNN_EXTRA_BYTES / sizeof(float)] = {0.5f, 1.5f}; - // external input[0] bias [2] static filter [1] - // | / / - // [convert f32->qd8] / / - // \ / / - // \ / / - // [fully connected] - // | - // fully connected out [3] - const uint32_t input_id = 0; - const uint32_t filter_id = 1; - const uint32_t bias_id = 2; - const uint32_t converted_input_id = 3; - const uint32_t fully_connected_out_id = 4; - tester.AddInputTensorF32({5, 3}, input_id) - .AddDynamicallyQuantizedTensor({5, 3}, converted_input_id, /*flags=*/0) - .AddStaticTensorQS8({2, 3}, /*channel_dim=*/0, TensorType::kDense, - &kernel_scale[0], filter_id, /*flags=*/0, - static_filter_data) - .AddStaticTensorF32({2}, TensorType::kDense, bias_id, /*flags=*/0, - &bias[0]) - .AddOutputTensorF32({5, 2}, fully_connected_out_id) - .AddConvert(input_id, converted_input_id) - .AddFullyConnected(converted_input_id, filter_id, bias_id, - fully_connected_out_id) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: - // - // external input[0] bias [2] filter [1]* - // | | / - // [convert f32->f16] | / - // | | / - // [convert f16->qd8]* | / - // \ | / - // \ |/ - // [fully connected] - // | - // [convert f16->f32]* - // | - // fully connected out [3] - - reference_tester.AddInputTensorF32({5, 3}, input_id) - .AddDynamicallyQuantizedTensor({5, 3}, converted_input_id, /*flags=*/0) - .AddStaticTensorQS8({2, 3}, /*channel_dim=*/0, TensorType::kDense, - &kernel_scale[0], filter_id, /*flags=*/0, - static_filter_data) - .AddStaticTensorF32({2}, TensorType::kDense, bias_id, /*flags=*/0, - &bias[0]) - .AddOutputTensorF32({5, 2}, fully_connected_out_id) - .AddConvert(input_id, converted_input_id) - .AddFullyConnected(converted_input_id, filter_id, bias_id, - fully_connected_out_id); - - // We should have 4 nodes, the original fully connected and conversion - // nodes, a convert for the external input, and a convert for the external - // output. - xnnpack::ReplicableRandomDevice rng; - auto f32rng = std::bind(std::uniform_real_distribution(-1.f, 1.f), - std::ref(rng)); - xnnpack::Buffer input(15, xnnpack::XnnExtraBytes); - std::generate(input.begin(), input.end(), std::ref(f32rng)); - xnnpack::Buffer reference_output(10), output(10); - - switch (tester.NumNodes()) { - case 3: - // LHS packing was inlined. - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_fully_connected); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_convert); - ASSERT_TRUE(tester.Node(1)->flags & XNN_FLAG_INLINE_LHS_PACKING); - break; - case 4: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_fully_connected); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - break; - default: - GTEST_FAIL() << "Expected either 3 (inlined LHS packing) or 4 (no " - "inlined LHS packing) nodes, but got " - << tester.NumNodes() << "."; - } - - xnn_runtime_t fp16_runtime_ptr = nullptr; - xnn_status status = - xnn_create_runtime_v2(tester.Subgraph(), /*threadpool*/ nullptr, - xnn_test_runtime_flags(), &fp16_runtime_ptr); - if (status == xnn_status_unsupported_hardware) { - GTEST_SKIP(); - } - std::unique_ptr auto_fp16_runtime( - fp16_runtime_ptr, xnn_delete_runtime); - ASSERT_EQ(xnn_status_success, status); - xnn_runtime_t fp32_runtime_ptr = nullptr; - status = - xnn_create_runtime_v2(reference_tester.Subgraph(), /*threadpool*/ nullptr, - xnn_test_runtime_flags(), &fp32_runtime_ptr); - ASSERT_EQ(xnn_status_success, status); - std::unique_ptr auto_fp32_runtime( - fp32_runtime_ptr, xnn_delete_runtime); - - std::array external_values = { - xnn_external_value{input_id, input.data()}, - xnn_external_value{fully_connected_out_id, output.data()}}; - ASSERT_EQ(xnn_status_success, - xnn_setup_runtime(fp16_runtime_ptr, 2, external_values.data())); - ASSERT_EQ(xnn_status_success, xnn_invoke_runtime(fp16_runtime_ptr)); - - std::array reference_external_values = { - xnn_external_value{input_id, input.data()}, - xnn_external_value{fully_connected_out_id, reference_output.data()}}; - ASSERT_EQ( - xnn_status_success, - xnn_setup_runtime(fp32_runtime_ptr, 2, reference_external_values.data())); - ASSERT_EQ(xnn_status_success, xnn_invoke_runtime(fp32_runtime_ptr)); - - for (int i = 0; i < output.size(); ++i) { - const float tolerance = - std::max(std::abs(reference_output[i]) * 5e-2, 5e-2); - ASSERT_NEAR(output[i], reference_output[i], tolerance); - } -} - -TEST(SUBGRAPH_FP16, fully_connected_weights_used_by_another_node) { - SubgraphTester tester(7); - - float static_filter_data[6 + XNN_EXTRA_BYTES / sizeof(float)] = { - 1.0f, 2.0f, 3.0f, 4.0f, 5.0f, 6.0f, - }; - // external input[0] bias [2] static filter [1] external input [6] - // - // \ / / \ / - // \ / / \ / - // [fully connected] [subtract] - // | | - // fully connected out [3] subtract out [5] - const uint32_t input_id = 0; - const uint32_t filter_id = 1; - const uint32_t bias_id = 2; - const uint32_t fully_connected_out_id = 3; - const uint32_t out_id2 = 5; - const uint32_t subtract_input_id = 6; - tester.AddInputTensorF32({5, 3}, input_id) - .AddStaticTensorF32({2, 3}, TensorType::kDense, filter_id, /*flags=*/0, - static_filter_data) - .AddStaticTensorF32({2}, TensorType::kDense, bias_id) - .AddOutputTensorF32({5, 2}, fully_connected_out_id) - .AddInputTensorF32({2, 3}, subtract_input_id) - .AddOutputTensorF32({2, 3}, out_id2) - .AddFullyConnected(input_id, filter_id, bias_id, fully_connected_out_id) - .AddSubtract(filter_id, subtract_input_id, out_id2) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static filter data has - // been converted into a new buffer. - // - // external input[0] bias [2] filter [1]* external input [6] - // \ / / \ / - // [convert]* / / \ [convert]* - // \ / / \ / - // \ / / \ / - // [fully connected] [subtract] - // | | - // [convert]* [convert]* - // | | - // fully connected out [3] subtract out [5] - - // We should have 6 nodes, the original fully connected and subtraction - // node, a convert for the two external inputs, and a convert for the two - // external outputs. - switch (tester.NumNodes()) { - case 6: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_fully_connected); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(4)->type, xnn_node_type_binary_elementwise); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - break; - case 7: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_pack_lh); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_fully_connected); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(4)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(5)->type, xnn_node_type_binary_elementwise); - ASSERT_EQ(tester.Node(6)->type, xnn_node_type_convert); - break; - default: - GTEST_FAIL() << "Expected either 6 or 7 nodes, but got " - << tester.NumNodes() << "."; - } - - // The static value should be converted to FP16 - const xnn_value* static_value = tester.Value(filter_id); - ASSERT_EQ(static_value->datatype, xnn_datatype_fp16); - ASSERT_EQ(static_value->fp32_data, static_filter_data); - // Weights are converted to fp16. - ASSERT_EQ(static_cast(static_value->data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->data)[1], 2.0f); - ASSERT_EQ(static_cast(static_value->data)[2], 3.0f); - ASSERT_EQ(static_cast(static_value->data)[3], 4.0f); - ASSERT_EQ(static_cast(static_value->data)[4], 5.0f); - ASSERT_EQ(static_cast(static_value->data)[5], 6.0f); - // But original fp32 weights kept around. - ASSERT_EQ(static_cast(static_value->fp32_data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[1], 2.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[2], 3.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[3], 4.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[4], 5.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[5], 6.0f); -} - -TEST(SUBGRAPH_FP16, fully_connected_bias_used_by_another_node) { - SubgraphTester tester(7); - - float static_bias_data[2 + XNN_EXTRA_BYTES / sizeof(float)] = { - 1.0f, - 2.0f, - }; - // external input[0] bias [2] static filter [1] external input [6] - // - // \ / / \ / - // \ / / \ / - // [fully connected] [subtract] - // | | - // fully connected out [3] subtract out [5] - const uint32_t input_id = 0; - const uint32_t filter_id = 1; - const uint32_t bias_id = 2; - const uint32_t fully_connected_out_id = 3; - const uint32_t out_id2 = 5; - const uint32_t subtract_input_id = 6; - tester.AddInputTensorF32({5, 3}, input_id) - .AddStaticTensorF32({2, 3}, TensorType::kDense, filter_id) - .AddStaticTensorF32({2}, TensorType::kDense, bias_id, /*flags=*/0, - static_bias_data) - .AddOutputTensorF32({5, 2}, fully_connected_out_id) - .AddInputTensorF32({2}, subtract_input_id) - .AddOutputTensorF32({2}, out_id2) - .AddFullyConnected(input_id, filter_id, bias_id, fully_connected_out_id) - .AddSubtract(bias_id, subtract_input_id, out_id2) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static bias data has - // been converted into a new buffer. - // - // external input[0] bias [2] filter [1]* external input [6] - // \ / / \ / - // [convert]* / / \ [convert]* - // \ / / \ / - // \ / / \ / - // [fully connected] [subtract] - // | | - // [convert]* [convert]* - // | | - // fully connected out [3] subtract out [5] - - // We should have 6 nodes, the original fully connected and subtraction - // node, a convert for the two external inputs, and a convert for the two - // external outputs. - switch (tester.NumNodes()) { - case 6: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_fully_connected); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(4)->type, xnn_node_type_binary_elementwise); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - break; - case 7: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_pack_lh); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_fully_connected); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(4)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(5)->type, xnn_node_type_binary_elementwise); - ASSERT_EQ(tester.Node(6)->type, xnn_node_type_convert); - break; - default: - GTEST_FAIL() << "Expected either 6 or 7 nodes, but got " - << tester.NumNodes() << "."; - } - - // The static value should be converted to FP16 - const xnn_value* static_value = tester.Value(bias_id); - ASSERT_EQ(static_value->datatype, xnn_datatype_fp16); - ASSERT_EQ(static_value->fp32_data, static_bias_data); - // Weights are converted to fp16. - ASSERT_EQ(static_cast(static_value->data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->data)[1], 2.0f); - // But original fp32 weights kept around. - ASSERT_EQ(static_cast(static_value->fp32_data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[1], 2.0f); -} - -TEST(SUBGRAPH_FP16, prelu_slope_used_by_another_node) { - SubgraphTester tester(5); - - float static_slope_data[2 + XNN_EXTRA_BYTES / sizeof(float)] = { - 1.0f, - 2.0f, - }; - // external input[0] static slope [1] external input [4] - // - // \ / \ / - // \ / \ / - // [prelu] [subtract] - // | | - // prelu out [2] subtract out [3] - const uint32_t input_id = 0; - const uint32_t slope_id = 1; - const uint32_t prelu_out_id = 2; - const uint32_t out_id2 = 3; - const uint32_t subtract_input_id = 4; - tester.AddInputTensorF32({5, 3, 3, 2}, input_id) - .AddStaticTensorF32({2}, TensorType::kDense, slope_id, /*flags=*/0, - static_slope_data) - .AddOutputTensorF32({5, 3, 3, 2}, prelu_out_id) - .AddInputTensorF32({2}, subtract_input_id) - .AddOutputTensorF32({2}, out_id2) - .AddPrelu(input_id, slope_id, prelu_out_id) - .AddSubtract(slope_id, subtract_input_id, out_id2) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static bias data has - // been converted into a new buffer. - // - // external input[0] static slope [1]* external input [4] - // \ / \ / - // [convert]* / \ [convert]* - // \ / \ / - // \ / \ / - // [prelu] [subtract] - // | | - // [convert]* [convert]* - // | | - // prelu out [2] subtract out [3] - - // We should have 6 nodes, the original prelu and subtraction node, a - // convert for the two external inputs, and a convert for the two external - // outputs. - ASSERT_EQ(tester.NumNodes(), 6); - - // The static value should be converted to FP16 - const xnn_value* static_value = tester.Value(slope_id); - ASSERT_EQ(static_value->datatype, xnn_datatype_fp16); - ASSERT_EQ(static_value->fp32_data, static_slope_data); - // Weights are converted to fp16. - ASSERT_EQ(static_cast(static_value->data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->data)[1], 2.0f); - // But original fp32 weights kept around. - ASSERT_EQ(static_cast(static_value->fp32_data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->fp32_data)[1], 2.0f); -} - -TEST(SUBGRAPH_FP16_DYNAMIC_FULLY_CONNECTED, - dynamic_weights_no_bias_weights_converted_to_fp16) { - SubgraphTester tester(5); - - // external input[0] external input [1] - // \ / - // \ [constant pad] - // \ / - // [fully connected] - // | - // fully connected out [2] - const uint32_t input_id = 0; - const uint32_t input2_id = 1; - const uint32_t weights_id = 3; - const uint32_t fully_connected_out_id = 2; - std::array pre_paddings = {1, 0, 0, 0}; - std::array post_paddings = {0, 0, 0, 0}; - tester.AddInputTensorF32({1, 5, 5, 3}, input_id) - .AddInputTensorF32({1, 1, 1, 3}, input2_id) - .AddOutputTensorF32({1, 5, 5, 2}, fully_connected_out_id) - .AddDynamicTensorF32({2, 1, 1, 3}, weights_id) - .AddConstantPad(pre_paddings.data(), post_paddings.data(), 0.0f, - input2_id, weights_id) - .AddFullyConnected(input_id, weights_id, - /*bias_id=*/XNN_INVALID_VALUE_ID, - fully_connected_out_id) - .Optimize() - .RewriteForFp16(); - - const xnn_value* weights_value = tester.Value(weights_id); - ASSERT_EQ(weights_value->datatype, xnn_datatype_fp16); -} - -TEST(SUBGRAPH_FP16_DYNAMIC_FULLY_CONNECTED, - dynamic_weights_static_bias_weights_converted_to_fp16) { - SubgraphTester tester(5); - - // external input[0] external input [1] - // \ / static bias [4] - // \ [constant pad] / - // \ / / - // [fully connected] - // | - // fully connected out [2] - const uint32_t input_id = 0; - const uint32_t input2_id = 1; - const uint32_t weights_id = 3; - const uint32_t bias_id = 4; - const uint32_t fully_connected_out_id = 2; - std::array pre_paddings = {1, 0, 0, 0}; - std::array post_paddings = {0, 0, 0, 0}; - tester.AddInputTensorF32({1, 5, 5, 3}, input_id) - .AddInputTensorF32({1, 1, 1, 3}, input2_id) - .AddOutputTensorF32({1, 5, 5, 2}, fully_connected_out_id) - .AddDynamicTensorF32({2, 1, 1, 3}, weights_id) - .AddStaticTensorF32({2}, TensorType::kDense, bias_id) - .AddConstantPad(pre_paddings.data(), post_paddings.data(), 0.0f, - input2_id, weights_id) - .AddFullyConnected(input_id, weights_id, bias_id, fully_connected_out_id) - .Optimize() - .RewriteForFp16(); - - const xnn_value* weights_value = tester.Value(weights_id); - ASSERT_EQ(weights_value->datatype, xnn_datatype_fp16); -} - -TEST(SUBGRAPH_FP16_DYNAMIC_FULLY_CONNECTED, - static_weights_dynamic_bias_bias_converted_to_fp16) { - SubgraphTester tester(5); - - // external input[0] static weights [4] external input [1] - // \ | / - // \ | [constant pad] - // \ | / - // [fully connected] - // | - // fully connected out [2] - const uint32_t input_id = 0; - const uint32_t input2_id = 1; - const uint32_t weights_id = 3; - const uint32_t bias_id = 4; - const uint32_t fully_connected_out_id = 2; - std::array pre_paddings = {1}; - std::array post_paddings = {0}; - tester.AddInputTensorF32({1, 5, 5, 3}, input_id) - .AddInputTensorF32({1}, input2_id) - .AddOutputTensorF32({1, 5, 5, 2}, fully_connected_out_id) - .AddStaticTensorF32({2, 1, 1, 3}, TensorType::kDense, weights_id) - .AddDynamicTensorF32({2}, bias_id) - .AddConstantPad(pre_paddings.data(), post_paddings.data(), 0.0f, - input2_id, bias_id) - .AddFullyConnected(input_id, weights_id, bias_id, fully_connected_out_id) - .Optimize() - .RewriteForFp16(); - - const xnn_value* bias_value = tester.Value(bias_id); - ASSERT_EQ(bias_value->datatype, xnn_datatype_fp16); -} - -TEST(SUBGRAPH_FP16_DYNAMIC_FULLY_CONNECTED, - dynamic_weights_dynamic_bias_weights_and_bias_converted_to_fp16) { - SubgraphTester tester(6); - - // external input[0] external input [1] external input [2] - // \ / / - // \ [constant pad] [constant pad] - // \ / / - // [fully connected] - // | - // fully connected out [5] - const uint32_t input_id = 0; - const uint32_t input2_id = 1; - const uint32_t input3_id = 2; - const uint32_t weights_id = 3; - const uint32_t bias_id = 4; - const uint32_t fully_connected_out_id = 5; - - std::array weights_pre_paddings = {1, 0, 0, 0}; - std::array weights_post_paddings = {0, 0, 0, 0}; - std::array bias_pre_paddings = {1}; - std::array bias_post_paddings = {0}; - - tester.AddInputTensorF32({1, 5, 5, 3}, input_id) - .AddInputTensorF32({1, 1, 1, 3}, input2_id) - .AddInputTensorF32({1}, input3_id) - .AddOutputTensorF32({1, 5, 5, 2}, fully_connected_out_id) - .AddDynamicTensorF32({2, 1, 1, 3}, weights_id) - .AddDynamicTensorF32({2}, bias_id) - .AddConstantPad(weights_pre_paddings.data(), weights_post_paddings.data(), - 0.0f, input2_id, weights_id) - .AddConstantPad(bias_pre_paddings.data(), bias_post_paddings.data(), 0.0f, - input3_id, bias_id) - .AddFullyConnected(input_id, weights_id, bias_id, fully_connected_out_id) - .Optimize() - .RewriteForFp16(); - - const xnn_value* weights_value = tester.Value(weights_id); - ASSERT_EQ(weights_value->datatype, xnn_datatype_fp16); - const xnn_value* bias_value = tester.Value(bias_id); - ASSERT_EQ(bias_value->datatype, xnn_datatype_fp16); -} - -TEST(SUBGRAPH_FP16_BATCH_MATRIX_MULTIPLY, with_static_value) { - SubgraphTester tester(3); - float static_tensor_data[3 + XNN_EXTRA_BYTES / sizeof(float)] = {1.0f, 2.0f, - 3.0f}; - // external input[0] static[1] - // \ / - // \ / - // [batch matrix multiply] - // | - // external - // output[2] - tester - .AddInputTensorF32({1, 2, 2, 3}, 0) - // Tensor #1 is both static and external - .AddStaticTensorF32({1, 1, 1, 3}, TensorType::kDense, 1, - /*flags=*/XNN_VALUE_FLAG_EXTERNAL_INPUT, - static_tensor_data) - .AddOutputTensorF32({1, 2, 2, 3}, 2) - .AddBatchMatrixMultiply(0, 1, 2, 0) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static tensor data has - // been converted into a new buffer. - // - // external input[0] - // | - // [convert]* - // | - // input[3]* static[1]* (converted into new buffer) - // \ / - // \ / - // [batch matrix multiply] - // | - // fp16 value[4]* - // | - // [convert]* - // | - // external - // output[2] - - // We should have 3 nodes, the original BMM node, plus one convert node for - // each of the external input and output. - switch (tester.NumNodes()) { - case 3: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_batch_matrix_multiply); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_convert); - break; - case 4: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_pack_lh); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_batch_matrix_multiply); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - break; - default: - GTEST_FAIL() << "Expected either 3 or 4 nodes, but got " - << tester.NumNodes() << "."; - } - - // The static value should be converted to FP16 - const xnn_value* static_value = tester.Value(1); - ASSERT_EQ(static_value->datatype, xnn_datatype_fp16); - ASSERT_EQ(static_cast(static_value->data)[0], 1.0f); - ASSERT_EQ(static_cast(static_value->data)[1], 2.0f); - ASSERT_EQ(static_cast(static_value->data)[2], 3.0f); - - // Check that the output of convert is allocated in workspace. - const xnn_value* convert_out = tester.Value(3); - ASSERT_EQ(convert_out->allocation_type, xnn_allocation_type_workspace); -} - -TEST(SUBGRAPH_FP16_BATCH_MATRIX_MULTIPLY, with_non_static_value) { - SubgraphTester tester(3); - - // external input[0] input[1] - // \ / - // \ / - // [batch matrix multiply] - // | - // external - // output[2] - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddInputTensorF32({1, 1, 1, 3}, 1) - .AddOutputTensorF32({1, 2, 2, 3}, 2) - .AddBatchMatrixMultiply(0, 1, 2, 0) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static tensor data has - // been converted into a new buffer. - // - // external input[0] external input[1] - // | | - // [convert]* [convert]* - // | | - // input[3]* input[4]* - // \ / - // \ / - // [batch matrix multiply] - // | - // fp16 value[4]* - // | - // [convert]* - // | - // external - // output[2] - - // We should have 4 nodes, the original BMM node, plus one convert node for - // each of the external inputs and output. - switch (tester.NumNodes()) { - case 4: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_batch_matrix_multiply); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_convert); - break; - case 5: - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_pack_lh); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(3)->type, xnn_node_type_batch_matrix_multiply); - ASSERT_EQ(tester.Node(4)->type, xnn_node_type_convert); - break; - default: - GTEST_FAIL() << "Expected either 4 or 5 nodes, but got " - << tester.NumNodes() << "."; - } - - // Check that the output of convert is allocated in workspace. - const xnn_value* convert_out = tester.Value(3); - ASSERT_EQ(convert_out->allocation_type, xnn_allocation_type_workspace); -} - -TEST(SUBGRAPH_FP16_DUPLICATE_INPUTS, converted_only_once) { - SubgraphTester tester(2); - - // external input[0] input[0] - // \ / - // \ / - // [add] - // | - // external - // output[1] - tester.AddInputTensorF32({1, 2, 2, 3}, 0) - .AddOutputTensorF32({1, 2, 2, 3}, 1) - .AddBinary(xnn_binary_add, nullptr, 0, 0, 1) - .Optimize() - .RewriteForFp16(); - - // After rewriting for FP16, the graph should look like this, with * - // indicating new operators and values created: The static tensor data has - // been converted into a new buffer. - // - // external input[0] - // | - // [convert]* - // | - // input[2]*. input[2]* - // \. / - // \ / - // [add] - // | - // fp16 value[3]* - // | - // [convert]* - // | - // external - // output[1] - - // We should have 3 nodes, the original Add node, plus one convert node for - // each of the external input and output. - ASSERT_EQ(tester.NumNodes(), 3); - ASSERT_EQ(tester.Node(0)->type, xnn_node_type_convert); - ASSERT_EQ(tester.Node(1)->type, xnn_node_type_binary_elementwise); - ASSERT_EQ(tester.Node(2)->type, xnn_node_type_convert); - - // Check that the inputs to the Add node are the same value. - ASSERT_EQ(tester.Node(1)->inputs[0], tester.Node(1)->inputs[1]); - - // Check that the output of convert is allocated in workspace. - const xnn_value* convert_out = tester.Value(3); - ASSERT_EQ(convert_out->allocation_type, xnn_allocation_type_workspace); -} - -#if XNN_ARCH_ARM64 && XNN_ENABLE_KLEIDIAI -// This test targets the failure where pf16 packed-LHS iGEMM kernels were -// accidentally invoked through the non-packed iGEMM call path. The packed-LHS -// kernels have a different function signature, so the runtime ended up passing -// mismatched arguments (e.g. params pointer where a stride was expected), -// causing a crash. In this test we build a Conv2D that forces the pf16 iGEMM path with -// inline LHS packing enabled -TEST(SUBGRAPH_FP16_CONVOLUTION, inline_lhs_packing_pf16) { - - const auto* hw = xnn_init_hardware_config(); - if (!hw || (hw->arch_flags & xnn_arch_arm_sme2) == 0 - || (hw->arch_flags & xnn_arch_arm_sme ) == 0) { - GTEST_SKIP() << "PF16/SME(2) path not available on this target"; - } - - // Construct an NHWC Conv that triggers iGEMM path - // Shapes: N=1, H=W=8 => output_size=64; Cin=32, Cout=64. - SubgraphTester tester(/*external_value_ids=*/ 4); - SubgraphTester reference_tester(/*external_value_ids=*/ 4); - - const uint32_t input_id = 0; - const uint32_t filter_id = 1; - const uint32_t bias_id = 2; - const uint32_t output_id = 3; - const uint32_t runtime_flags = xnn_test_runtime_flags() & ~XNN_FLAG_NO_INLINED_LHS_PACKING; - - // Build FP32 graph (then rewrite to FP16 in tester). - tester.AddInputTensorF32({1, 8, 8, 32}, input_id) - .AddStaticTensorF32({64, 3, 3, 32}, TensorType::kDense, filter_id) - .AddStaticTensorF32({64}, TensorType::kDense, bias_id) - .AddOutputTensorF32({1, 8, 8, 64}, output_id) - .AddConvolution2D( - ConvolutionParams{ - Padding{1, 1, 1, 1}, - Kernel{3, 3}, - Subsampling{1, 1}, - Dilation{1, 1}, - /*groups=*/1, - /*group_input_channels=*/32, - /*group_output_channels=*/64, - /*output_min=*/-INFINITY, - /*output_max=*/INFINITY}, - input_id, filter_id, bias_id, output_id, 0) - .RewriteForFp16() - .Optimize(runtime_flags); - - // Reference FP32 graph for output comparison. - reference_tester - .AddInputTensorF32({1, 8, 8, 32}, input_id) - .AddStaticTensorF32({64, 3, 3, 32}, TensorType::kDense, filter_id) - .AddStaticTensorF32({64}, TensorType::kDense, bias_id) - .AddOutputTensorF32({1, 8, 8, 64}, output_id) - .AddConvolution2D( - ConvolutionParams{ - Padding{1, 1, 1, 1}, - Kernel{3, 3}, - Subsampling{1, 1}, - Dilation{1, 1}, - /*groups=*/1, - /*group_input_channels=*/32, - /*group_output_channels=*/64, - /*output_min=*/-INFINITY, - /*output_max=*/INFINITY}, - input_id, filter_id, bias_id, output_id, 0) - .Optimize(runtime_flags); - - // Sanity-check whether inline LHS packing got requested - bool saw_inline = false; - for (uint32_t i = 0; i < tester.NumNodes(); i++) { - const xnn_node* n = tester.Node(i); - if (n->type == xnn_node_type_convolution_2d && - (n->flags & XNN_FLAG_INLINE_LHS_PACKING)) { - saw_inline = true; - break; - } - } - - EXPECT_TRUE(saw_inline) - << "Inlined LHS packing was not selected; " - "check PF16 config and runtime flags"; - - // Create runtimes. - xnn_runtime_t fp16_runtime_ptr = nullptr; - - xnn_status status = - xnn_create_runtime_v2(tester.Subgraph(), /*threadpool=*/nullptr, - runtime_flags, &fp16_runtime_ptr); - if (status == xnn_status_unsupported_hardware) { - // If SME(2)/PF16 isn’t available, skip. - GTEST_SKIP(); - } - ASSERT_EQ(xnn_status_success, status); - std::unique_ptr auto_fp16_runtime( - fp16_runtime_ptr, xnn_delete_runtime); - - xnn_runtime_t fp32_runtime_ptr = nullptr; - status = xnn_create_runtime_v2(reference_tester.Subgraph(), /*threadpool=*/nullptr, - runtime_flags, &fp32_runtime_ptr); - ASSERT_EQ(xnn_status_success, status); - std::unique_ptr auto_fp32_runtime( - fp32_runtime_ptr, xnn_delete_runtime); - - // Random FP32 input. The FP16 subgraph will insert convert nodes for external I/O. - xnnpack::ReplicableRandomDevice rng; - auto f32rng = std::bind(std::uniform_real_distribution(-1.f, 1.f), std::ref(rng)); - xnnpack::Buffer input(1 * 8 * 8 * 32, xnnpack::XnnExtraBytes); - std::generate(input.begin(), input.end(), std::ref(f32rng)); - - xnnpack::Buffer out_fp16(1 * 8 * 8 * 64), out_fp32(1 * 8 * 8 * 64); - - std::array ext_fp16 = { - xnn_external_value{input_id, input.data()}, - xnn_external_value{output_id, out_fp16.data()}}; - ASSERT_EQ(xnn_status_success, xnn_setup_runtime(fp16_runtime_ptr, 2, ext_fp16.data())); - ASSERT_EQ(xnn_status_success, xnn_invoke_runtime(fp16_runtime_ptr)); - - std::array ext_fp32 = { - xnn_external_value{input_id, input.data()}, - xnn_external_value{output_id, out_fp32.data()}}; - ASSERT_EQ(xnn_status_success, xnn_setup_runtime(fp32_runtime_ptr, 2, ext_fp32.data())); - ASSERT_EQ(xnn_status_success, xnn_invoke_runtime(fp32_runtime_ptr)); - - // Compare with a reasonable tolerance. This is primarily to ensure the path runs without crash. - for (size_t i = 0; i < out_fp16.size(); ++i) { - const float tol = std::max(std::abs(out_fp32[i]) * 5e-2f, 5e-2f); - ASSERT_NEAR(out_fp16[i], out_fp32[i], tol); - } -} -#endif - -} // namespace xnnpack diff --git a/test/subgraph/subgraph-tester.cc b/test/subgraph/subgraph-tester.cc index 25ddbf0e422..520155b7bf6 100644 --- a/test/subgraph/subgraph-tester.cc +++ b/test/subgraph/subgraph-tester.cc @@ -773,18 +773,6 @@ SubgraphTester& SubgraphTester::RewriteForNchw() { return *this; } -SubgraphTester& SubgraphTester::RewriteForFp16() { - EXPECT_TRUE(xnn_subgraph_rewrite_for_fp16(subgraph_.get())); - - return *this; -} - -SubgraphTester& SubgraphTester::RewriteForFp16WithFailure() { - EXPECT_FALSE(xnn_subgraph_rewrite_for_fp16(subgraph_.get())); - - return *this; -} - xnn_status SubgraphTester::CreateRuntime(xnn_weights_cache_t weights_cache, xnn_workspace_t workspace, pthreadpool_t threadpool, diff --git a/test/subgraph/subgraph-tester.h b/test/subgraph/subgraph-tester.h index a0b2d945284..c9136ef6c18 100644 --- a/test/subgraph/subgraph-tester.h +++ b/test/subgraph/subgraph-tester.h @@ -525,10 +525,6 @@ class SubgraphTester { SubgraphTester& RewriteForNchw(); - SubgraphTester& RewriteForFp16(); - - SubgraphTester& RewriteForFp16WithFailure(); - xnn_status CreateRuntime(xnn_weights_cache_t weights_cache, xnn_workspace_t workspace, pthreadpool_t threadpool, uint32_t flags); diff --git a/ynnpack/xnnpack/subgraph.cc b/ynnpack/xnnpack/subgraph.cc index 66b87e25384..b54c4783b79 100644 --- a/ynnpack/xnnpack/subgraph.cc +++ b/ynnpack/xnnpack/subgraph.cc @@ -108,11 +108,6 @@ xnn_status xnn_subgraph_rewrite_for_nchw(xnn_subgraph_t subgraph) { return xnn_status_deprecated; } -xnn_status xnn_subgraph_rewrite_for_fp16(xnn_subgraph_t subgraph) { - YNN_LOG_ERROR() << "Test-only XNNPACK operation not supported"; - return xnn_status_deprecated; -} - xnn_status xnn_define_unary(xnn_subgraph_t subgraph, xnn_unary_operator type, const union xnn_unary_params* params, uint32_t input_id, uint32_t output_id,