|
|
|
|
|
|
|
|
|
|
|
#include <xnnpack.h> |
|
|
|
#include <array> |
|
#include <algorithm> |
|
#include <functional> |
|
#include <iostream> |
|
#include <limits> |
|
#include <random> |
|
|
|
#include <xnnpack/cache.h> |
|
#include <xnnpack/common.h> |
|
#include <xnnpack/models.h> |
|
|
|
namespace models { |
|
|
|
ExecutionPlan QU8MobileNetV1(pthreadpool_t threadpool) { |
|
alignas(16) static std::array<uint8_t, 150528 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v0; |
|
alignas(16) static std::array<uint8_t, 401408 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v1; |
|
alignas(16) static std::array<uint8_t, 401408 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v2; |
|
alignas(16) static std::array<uint8_t, 802816 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v3; |
|
alignas(16) static std::array<uint8_t, 200704 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v4; |
|
alignas(16) static std::array<uint8_t, 401408 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v5; |
|
alignas(16) static std::array<uint8_t, 401408 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v6; |
|
alignas(16) static std::array<uint8_t, 401408 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v7; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v8; |
|
alignas(16) static std::array<uint8_t, 200704 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v9; |
|
alignas(16) static std::array<uint8_t, 200704 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v10; |
|
alignas(16) static std::array<uint8_t, 200704 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v11; |
|
alignas(16) static std::array<uint8_t, 50176 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v12; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v13; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v14; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v15; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v16; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v17; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v18; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v19; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v20; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v21; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v22; |
|
alignas(16) static std::array<uint8_t, 100352 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v23; |
|
alignas(16) static std::array<uint8_t, 25088 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v24; |
|
alignas(16) static std::array<uint8_t, 50176 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v25; |
|
alignas(16) static std::array<uint8_t, 50176 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v26; |
|
alignas(16) static std::array<uint8_t, 50176 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v27; |
|
alignas(16) static std::array<uint8_t, 1024 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v28; |
|
alignas(16) static std::array<uint8_t, 1001 + XNN_EXTRA_BYTES / sizeof(uint8_t)> v29; |
|
alignas(16) static std::array<uint8_t, 864 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w30; |
|
alignas(16) static std::array<int32_t, 32 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w31; |
|
alignas(16) static std::array<uint8_t, 288 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w32; |
|
alignas(16) static std::array<int32_t, 32 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w33; |
|
alignas(16) static std::array<uint8_t, 2048 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w34; |
|
alignas(16) static std::array<int32_t, 64 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w35; |
|
alignas(16) static std::array<uint8_t, 576 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w36; |
|
alignas(16) static std::array<int32_t, 64 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w37; |
|
alignas(16) static std::array<uint8_t, 8192 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w38; |
|
alignas(16) static std::array<int32_t, 128 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w39; |
|
alignas(16) static std::array<uint8_t, 1152 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w40; |
|
alignas(16) static std::array<int32_t, 128 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w41; |
|
alignas(16) static std::array<uint8_t, 16384 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w42; |
|
alignas(16) static std::array<int32_t, 128 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w43; |
|
alignas(16) static std::array<uint8_t, 1152 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w44; |
|
alignas(16) static std::array<int32_t, 128 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w45; |
|
alignas(16) static std::array<uint8_t, 32768 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w46; |
|
alignas(16) static std::array<int32_t, 256 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w47; |
|
alignas(16) static std::array<uint8_t, 2304 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w48; |
|
alignas(16) static std::array<int32_t, 256 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w49; |
|
alignas(16) static std::array<uint8_t, 65536 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w50; |
|
alignas(16) static std::array<int32_t, 256 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w51; |
|
alignas(16) static std::array<uint8_t, 2304 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w52; |
|
alignas(16) static std::array<int32_t, 256 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w53; |
|
alignas(16) static std::array<uint8_t, 131072 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w54; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w55; |
|
alignas(16) static std::array<uint8_t, 4608 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w56; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w57; |
|
alignas(16) static std::array<uint8_t, 262144 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w58; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w59; |
|
alignas(16) static std::array<uint8_t, 4608 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w60; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w61; |
|
alignas(16) static std::array<uint8_t, 262144 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w62; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w63; |
|
alignas(16) static std::array<uint8_t, 4608 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w64; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w65; |
|
alignas(16) static std::array<uint8_t, 262144 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w66; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w67; |
|
alignas(16) static std::array<uint8_t, 4608 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w68; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w69; |
|
alignas(16) static std::array<uint8_t, 262144 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w70; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w71; |
|
alignas(16) static std::array<uint8_t, 4608 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w72; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w73; |
|
alignas(16) static std::array<uint8_t, 262144 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w74; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w75; |
|
alignas(16) static std::array<uint8_t, 4608 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w76; |
|
alignas(16) static std::array<int32_t, 512 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w77; |
|
alignas(16) static std::array<uint8_t, 524288 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w78; |
|
alignas(16) static std::array<int32_t, 1024 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w79; |
|
alignas(16) static std::array<uint8_t, 9216 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w80; |
|
alignas(16) static std::array<int32_t, 1024 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w81; |
|
alignas(16) static std::array<uint8_t, 1048576 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w82; |
|
alignas(16) static std::array<int32_t, 1024 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w83; |
|
alignas(16) static std::array<uint8_t, 1025024 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w84; |
|
alignas(16) static std::array<int32_t, 1001 + XNN_EXTRA_BYTES / sizeof(uint8_t)> w85; |
|
|
|
std::random_device random_device; |
|
auto rng = std::mt19937(random_device()); |
|
auto u8rng = std::bind(std::uniform_int_distribution<uint32_t>(0, 255), std::ref(rng)); |
|
auto i32rng = std::bind(std::uniform_int_distribution<int32_t>(-10000, 10000), std::ref(rng)); |
|
std::generate(v0.begin(), v0.end(), std::ref(u8rng)); |
|
std::generate(v1.begin(), v1.end(), std::ref(u8rng)); |
|
std::generate(v2.begin(), v2.end(), std::ref(u8rng)); |
|
std::generate(v3.begin(), v3.end(), std::ref(u8rng)); |
|
std::generate(v4.begin(), v4.end(), std::ref(u8rng)); |
|
std::generate(v5.begin(), v5.end(), std::ref(u8rng)); |
|
std::generate(v6.begin(), v6.end(), std::ref(u8rng)); |
|
std::generate(v7.begin(), v7.end(), std::ref(u8rng)); |
|
std::generate(v8.begin(), v8.end(), std::ref(u8rng)); |
|
std::generate(v9.begin(), v9.end(), std::ref(u8rng)); |
|
std::generate(v10.begin(), v10.end(), std::ref(u8rng)); |
|
std::generate(v11.begin(), v11.end(), std::ref(u8rng)); |
|
std::generate(v12.begin(), v12.end(), std::ref(u8rng)); |
|
std::generate(v13.begin(), v13.end(), std::ref(u8rng)); |
|
std::generate(v14.begin(), v14.end(), std::ref(u8rng)); |
|
std::generate(v15.begin(), v15.end(), std::ref(u8rng)); |
|
std::generate(v16.begin(), v16.end(), std::ref(u8rng)); |
|
std::generate(v17.begin(), v17.end(), std::ref(u8rng)); |
|
std::generate(v18.begin(), v18.end(), std::ref(u8rng)); |
|
std::generate(v19.begin(), v19.end(), std::ref(u8rng)); |
|
std::generate(v20.begin(), v20.end(), std::ref(u8rng)); |
|
std::generate(v21.begin(), v21.end(), std::ref(u8rng)); |
|
std::generate(v22.begin(), v22.end(), std::ref(u8rng)); |
|
std::generate(v23.begin(), v23.end(), std::ref(u8rng)); |
|
std::generate(v24.begin(), v24.end(), std::ref(u8rng)); |
|
std::generate(v25.begin(), v25.end(), std::ref(u8rng)); |
|
std::generate(v26.begin(), v26.end(), std::ref(u8rng)); |
|
std::generate(v27.begin(), v27.end(), std::ref(u8rng)); |
|
std::generate(v28.begin(), v28.end(), std::ref(u8rng)); |
|
std::generate(v29.begin(), v29.end(), std::ref(u8rng)); |
|
std::generate(w30.begin(), w30.end(), std::ref(u8rng)); |
|
std::generate(w31.begin(), w31.end(), std::ref(i32rng)); |
|
std::generate(w32.begin(), w32.end(), std::ref(u8rng)); |
|
std::generate(w33.begin(), w33.end(), std::ref(i32rng)); |
|
std::generate(w34.begin(), w34.end(), std::ref(u8rng)); |
|
std::generate(w35.begin(), w35.end(), std::ref(i32rng)); |
|
std::generate(w36.begin(), w36.end(), std::ref(u8rng)); |
|
std::generate(w37.begin(), w37.end(), std::ref(i32rng)); |
|
std::generate(w38.begin(), w38.end(), std::ref(u8rng)); |
|
std::generate(w39.begin(), w39.end(), std::ref(i32rng)); |
|
std::generate(w40.begin(), w40.end(), std::ref(u8rng)); |
|
std::generate(w41.begin(), w41.end(), std::ref(i32rng)); |
|
std::generate(w42.begin(), w42.end(), std::ref(u8rng)); |
|
std::generate(w43.begin(), w43.end(), std::ref(i32rng)); |
|
std::generate(w44.begin(), w44.end(), std::ref(u8rng)); |
|
std::generate(w45.begin(), w45.end(), std::ref(i32rng)); |
|
std::generate(w46.begin(), w46.end(), std::ref(u8rng)); |
|
std::generate(w47.begin(), w47.end(), std::ref(i32rng)); |
|
std::generate(w48.begin(), w48.end(), std::ref(u8rng)); |
|
std::generate(w49.begin(), w49.end(), std::ref(i32rng)); |
|
std::generate(w50.begin(), w50.end(), std::ref(u8rng)); |
|
std::generate(w51.begin(), w51.end(), std::ref(i32rng)); |
|
std::generate(w52.begin(), w52.end(), std::ref(u8rng)); |
|
std::generate(w53.begin(), w53.end(), std::ref(i32rng)); |
|
std::generate(w54.begin(), w54.end(), std::ref(u8rng)); |
|
std::generate(w55.begin(), w55.end(), std::ref(i32rng)); |
|
std::generate(w56.begin(), w56.end(), std::ref(u8rng)); |
|
std::generate(w57.begin(), w57.end(), std::ref(i32rng)); |
|
std::generate(w58.begin(), w58.end(), std::ref(u8rng)); |
|
std::generate(w59.begin(), w59.end(), std::ref(i32rng)); |
|
std::generate(w60.begin(), w60.end(), std::ref(u8rng)); |
|
std::generate(w61.begin(), w61.end(), std::ref(i32rng)); |
|
std::generate(w62.begin(), w62.end(), std::ref(u8rng)); |
|
std::generate(w63.begin(), w63.end(), std::ref(i32rng)); |
|
std::generate(w64.begin(), w64.end(), std::ref(u8rng)); |
|
std::generate(w65.begin(), w65.end(), std::ref(i32rng)); |
|
std::generate(w66.begin(), w66.end(), std::ref(u8rng)); |
|
std::generate(w67.begin(), w67.end(), std::ref(i32rng)); |
|
std::generate(w68.begin(), w68.end(), std::ref(u8rng)); |
|
std::generate(w69.begin(), w69.end(), std::ref(i32rng)); |
|
std::generate(w70.begin(), w70.end(), std::ref(u8rng)); |
|
std::generate(w71.begin(), w71.end(), std::ref(i32rng)); |
|
std::generate(w72.begin(), w72.end(), std::ref(u8rng)); |
|
std::generate(w73.begin(), w73.end(), std::ref(i32rng)); |
|
std::generate(w74.begin(), w74.end(), std::ref(u8rng)); |
|
std::generate(w75.begin(), w75.end(), std::ref(i32rng)); |
|
std::generate(w76.begin(), w76.end(), std::ref(u8rng)); |
|
std::generate(w77.begin(), w77.end(), std::ref(i32rng)); |
|
std::generate(w78.begin(), w78.end(), std::ref(u8rng)); |
|
std::generate(w79.begin(), w79.end(), std::ref(i32rng)); |
|
std::generate(w80.begin(), w80.end(), std::ref(u8rng)); |
|
std::generate(w81.begin(), w81.end(), std::ref(i32rng)); |
|
std::generate(w82.begin(), w82.end(), std::ref(u8rng)); |
|
std::generate(w83.begin(), w83.end(), std::ref(i32rng)); |
|
std::generate(w84.begin(), w84.end(), std::ref(u8rng)); |
|
std::generate(w85.begin(), w85.end(), std::ref(i32rng)); |
|
|
|
ExecutionPlan operators; |
|
xnn_status status; |
|
|
|
xnn_operator_t op0 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 1 , |
|
1 , 0 , |
|
3 , 3 , |
|
2 , 2 , |
|
1 , 1 , |
|
1 , |
|
3 , |
|
32 , |
|
3 , |
|
32 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w30.data(), w31.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op0); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #0" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op0, xnn_delete_operator); |
|
|
|
xnn_operator_t op1 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
32 , |
|
1 , |
|
1 , |
|
32 , |
|
32 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w32.data(), w33.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op1); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #1" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op1, xnn_delete_operator); |
|
|
|
xnn_operator_t op2 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
32 , |
|
64 , |
|
32 , |
|
64 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w34.data(), w35.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op2); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #2" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op2, xnn_delete_operator); |
|
|
|
xnn_operator_t op3 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 1 , |
|
1 , 0 , |
|
3 , 3 , |
|
2 , 2 , |
|
1 , 1 , |
|
64 , |
|
1 , |
|
1 , |
|
64 , |
|
64 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w36.data(), w37.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op3); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #3" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op3, xnn_delete_operator); |
|
|
|
xnn_operator_t op4 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
64 , |
|
128 , |
|
64 , |
|
128 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w38.data(), w39.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op4); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #4" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op4, xnn_delete_operator); |
|
|
|
xnn_operator_t op5 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
128 , |
|
1 , |
|
1 , |
|
128 , |
|
128 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w40.data(), w41.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op5); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #5" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op5, xnn_delete_operator); |
|
|
|
xnn_operator_t op6 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
128 , |
|
128 , |
|
128 , |
|
128 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w42.data(), w43.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op6); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #6" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op6, xnn_delete_operator); |
|
|
|
xnn_operator_t op7 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 1 , |
|
1 , 0 , |
|
3 , 3 , |
|
2 , 2 , |
|
1 , 1 , |
|
128 , |
|
1 , |
|
1 , |
|
128 , |
|
128 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w44.data(), w45.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op7); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #7" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op7, xnn_delete_operator); |
|
|
|
xnn_operator_t op8 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
128 , |
|
256 , |
|
128 , |
|
256 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w46.data(), w47.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op8); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #8" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op8, xnn_delete_operator); |
|
|
|
xnn_operator_t op9 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
256 , |
|
1 , |
|
1 , |
|
256 , |
|
256 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w48.data(), w49.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op9); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #9" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op9, xnn_delete_operator); |
|
|
|
xnn_operator_t op10 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
256 , |
|
256 , |
|
256 , |
|
256 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w50.data(), w51.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op10); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #10" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op10, xnn_delete_operator); |
|
|
|
xnn_operator_t op11 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 1 , |
|
1 , 0 , |
|
3 , 3 , |
|
2 , 2 , |
|
1 , 1 , |
|
256 , |
|
1 , |
|
1 , |
|
256 , |
|
256 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w52.data(), w53.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op11); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #11" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op11, xnn_delete_operator); |
|
|
|
xnn_operator_t op12 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
256 , |
|
512 , |
|
256 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w54.data(), w55.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op12); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #12" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op12, xnn_delete_operator); |
|
|
|
xnn_operator_t op13 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
512 , |
|
1 , |
|
1 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w56.data(), w57.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op13); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #13" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op13, xnn_delete_operator); |
|
|
|
xnn_operator_t op14 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
512 , |
|
512 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w58.data(), w59.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op14); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #14" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op14, xnn_delete_operator); |
|
|
|
xnn_operator_t op15 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
512 , |
|
1 , |
|
1 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w60.data(), w61.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op15); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #15" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op15, xnn_delete_operator); |
|
|
|
xnn_operator_t op16 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
512 , |
|
512 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w62.data(), w63.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op16); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #16" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op16, xnn_delete_operator); |
|
|
|
xnn_operator_t op17 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
512 , |
|
1 , |
|
1 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w64.data(), w65.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op17); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #17" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op17, xnn_delete_operator); |
|
|
|
xnn_operator_t op18 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
512 , |
|
512 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w66.data(), w67.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op18); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #18" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op18, xnn_delete_operator); |
|
|
|
xnn_operator_t op19 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
512 , |
|
1 , |
|
1 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w68.data(), w69.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op19); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #19" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op19, xnn_delete_operator); |
|
|
|
xnn_operator_t op20 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
512 , |
|
512 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w70.data(), w71.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op20); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #20" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op20, xnn_delete_operator); |
|
|
|
xnn_operator_t op21 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
512 , |
|
1 , |
|
1 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w72.data(), w73.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op21); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #21" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op21, xnn_delete_operator); |
|
|
|
xnn_operator_t op22 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
512 , |
|
512 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w74.data(), w75.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op22); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #22" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op22, xnn_delete_operator); |
|
|
|
xnn_operator_t op23 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 1 , |
|
1 , 0 , |
|
3 , 3 , |
|
2 , 2 , |
|
1 , 1 , |
|
512 , |
|
1 , |
|
1 , |
|
512 , |
|
512 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w76.data(), w77.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op23); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #23" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op23, xnn_delete_operator); |
|
|
|
xnn_operator_t op24 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
512 , |
|
1024 , |
|
512 , |
|
1024 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w78.data(), w79.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op24); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #24" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op24, xnn_delete_operator); |
|
|
|
xnn_operator_t op25 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
1 , 1 , |
|
1 , 1 , |
|
3 , 3 , |
|
1 , 1 , |
|
1 , 1 , |
|
1024 , |
|
1 , |
|
1 , |
|
1024 , |
|
1024 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w80.data(), w81.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op25); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #25" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op25, xnn_delete_operator); |
|
|
|
xnn_operator_t op26 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
1024 , |
|
1024 , |
|
1024 , |
|
1024 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w82.data(), w83.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op26); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #26" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op26, xnn_delete_operator); |
|
|
|
xnn_operator_t op27 = nullptr; |
|
status = xnn_create_global_average_pooling_nwc_qu8( |
|
1024 , 1024 , 1024 , |
|
127 , 0.5f , |
|
127 , 0.5f , |
|
0 , 255 , |
|
0 , |
|
&op27); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #27" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op27, xnn_delete_operator); |
|
|
|
xnn_operator_t op28 = nullptr; |
|
status = xnn_create_convolution2d_nhwc_qu8( |
|
0 , 0 , |
|
0 , 0 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , 1 , |
|
1 , |
|
1024 , |
|
1001 , |
|
1024 , |
|
1001 , |
|
127 , 0.5f , 128 , 0.5f , |
|
w84.data(), w85.data(), |
|
127 , 0.5f , 0 , 255 , |
|
0 , |
|
nullptr, |
|
nullptr, |
|
&op28); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to create operation #28" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
operators.emplace_back(op28, xnn_delete_operator); |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op0, |
|
1, 224, 224, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #0" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op1, |
|
1, 112, 112, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #1" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op2, |
|
1, 112, 112, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #2" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op3, |
|
1, 112, 112, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #3" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op4, |
|
1, 56, 56, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #4" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op5, |
|
1, 56, 56, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #5" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op6, |
|
1, 56, 56, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #6" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op7, |
|
1, 56, 56, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #7" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op8, |
|
1, 28, 28, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #8" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op9, |
|
1, 28, 28, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #9" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op10, |
|
1, 28, 28, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #10" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op11, |
|
1, 28, 28, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #11" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op12, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #12" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op13, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #13" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op14, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #14" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op15, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #15" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op16, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #16" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op17, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #17" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op18, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #18" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op19, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #19" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op20, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #20" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op21, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #21" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op22, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #22" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op23, |
|
1, 14, 14, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #23" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op24, |
|
1, 7, 7, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #24" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op25, |
|
1, 7, 7, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #25" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op26, |
|
1, 7, 7, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #26" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_global_average_pooling_nwc_qu8( |
|
op27, |
|
1, 49 , |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #27" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_reshape_convolution2d_nhwc_qu8( |
|
op28, |
|
1, 1, 1, |
|
nullptr, nullptr, |
|
threadpool); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to reshape operation #28" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op0, |
|
v0.data(), v1.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #0" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op1, |
|
v1.data(), v2.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #1" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op2, |
|
v2.data(), v3.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #2" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op3, |
|
v3.data(), v4.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #3" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op4, |
|
v4.data(), v5.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #4" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op5, |
|
v5.data(), v6.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #5" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op6, |
|
v6.data(), v7.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #6" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op7, |
|
v7.data(), v8.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #7" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op8, |
|
v8.data(), v9.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #8" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op9, |
|
v9.data(), v10.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #9" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op10, |
|
v10.data(), v11.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #10" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op11, |
|
v11.data(), v12.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #11" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op12, |
|
v12.data(), v13.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #12" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op13, |
|
v13.data(), v14.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #13" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op14, |
|
v14.data(), v15.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #14" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op15, |
|
v15.data(), v16.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #15" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op16, |
|
v16.data(), v17.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #16" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op17, |
|
v17.data(), v18.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #17" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op18, |
|
v18.data(), v19.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #18" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op19, |
|
v19.data(), v20.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #19" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op20, |
|
v20.data(), v21.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #20" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op21, |
|
v21.data(), v22.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #21" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op22, |
|
v22.data(), v23.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #22" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op23, |
|
v23.data(), v24.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #23" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op24, |
|
v24.data(), v25.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #24" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op25, |
|
v25.data(), v26.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #25" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op26, |
|
v26.data(), v27.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #26" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_global_average_pooling_nwc_qu8( |
|
op27, |
|
v27.data(), v28.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #27" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
status = xnn_setup_convolution2d_nhwc_qu8( |
|
op28, |
|
v28.data(), v29.data()); |
|
if (status != xnn_status_success) { |
|
std::cerr << "failed to setup operation #28" << std::endl; |
|
return ExecutionPlan(); |
|
} |
|
|
|
XNN_PRAGMA_CLANG("clang diagnostic push") |
|
XNN_PRAGMA_CLANG("clang diagnostic ignored \"-Wpessimizing-move\"") |
|
return operators; |
|
XNN_PRAGMA_CLANG("clang diagnostic pop") |
|
} |
|
|
|
} |
|
|