blob: 31747d6acce9ac5ba98a67c841b886e8f4a6dbbd [file] [log] [blame]
/*
* Copyright 2023 Google LLC
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*/
// Test input/reference vectors for the vector convolution instruction
// functions.
#ifndef SIM_TEST_TESTFILES_KELVIN_VECTOR_CONVOLUTION_TESTDATA_H_
#define SIM_TEST_TESTFILES_KELVIN_VECTOR_CONVOLUTION_TESTDATA_H_
#include <cstdint>
// clang-format off
constexpr uint8_t kVConvIn1[8][32] = {
{
0xea, 0xe6, 0xaa, 0xb0, 0x5e, 0x46, 0x43, 0x2c,
0x58, 0x69, 0xd4, 0x25, 0xf0, 0xe9, 0x74, 0xd5,
0x34, 0x16, 0x4c, 0x86, 0xa8, 0x0c, 0xac, 0xa8,
0x9f, 0x99, 0x5d, 0xe0, 0x1a, 0x93, 0x65, 0x88,
},
{
0x4a, 0x3a, 0x57, 0x8b, 0x50, 0x6c, 0x1b, 0x37,
0x76, 0x8c, 0x72, 0x55, 0xb3, 0xce, 0xf3, 0x50,
0x74, 0x51, 0xb2, 0xb9, 0xb9, 0x76, 0xc4, 0x94,
0x29, 0x52, 0x16, 0xa8, 0x68, 0xa7, 0x8e, 0xe2,
},
{
0x61, 0xe8, 0xb8, 0xae, 0x43, 0x0a, 0xbe, 0xfa,
0x0b, 0x32, 0x7a, 0x92, 0x44, 0x3a, 0x60, 0xd3,
0x11, 0xc0, 0xb3, 0x8c, 0x7e, 0x5b, 0x9c, 0xe9,
0x03, 0x94, 0x7f, 0x10, 0x38, 0xd5, 0xc6, 0xeb,
},
{
0x5c, 0x79, 0x44, 0xe9, 0xfb, 0x32, 0x00, 0xf0,
0x79, 0xed, 0x92, 0x77, 0x93, 0x45, 0xc3, 0x63,
0x33, 0x7e, 0x07, 0xc5, 0x07, 0x76, 0x9d, 0xf0,
0x4e, 0x6a, 0x67, 0xcc, 0xca, 0xab, 0xd4, 0x24,
},
{
0x82, 0x86, 0xbb, 0xd9, 0x4b, 0xda, 0x2e, 0xbb,
0x8d, 0xbb, 0x82, 0x0e, 0x53, 0xaa, 0xb8, 0xfa,
0xa1, 0x75, 0x6e, 0x4a, 0x3c, 0xba, 0xa1, 0x88,
0x88, 0x6c, 0x74, 0x5b, 0x09, 0x83, 0x98, 0xdc,
},
{
0x91, 0x9a, 0x9f, 0xcd, 0x87, 0xd7, 0x74, 0x90,
0xa5, 0x25, 0xcf, 0x56, 0x5d, 0x41, 0x56, 0xc2,
0x0d, 0xdd, 0xd8, 0x2c, 0x59, 0x1d, 0x1c, 0x66,
0x06, 0xe9, 0xd3, 0x51, 0x83, 0x16, 0x65, 0x56,
},
{
0xf6, 0x95, 0x7c, 0x47, 0xf5, 0x56, 0x53, 0x58,
0x87, 0x9c, 0xde, 0xac, 0x76, 0x78, 0x71, 0x86,
0x5c, 0xdb, 0x5f, 0x0d, 0xc4, 0x5f, 0x48, 0x61,
0x48, 0x6f, 0x77, 0x26, 0x68, 0xf1, 0x39, 0x58,
},
{
0x32, 0x36, 0x68, 0x29, 0x67, 0xb8, 0x7c, 0xdd,
0xb9, 0x17, 0xb0, 0xec, 0x2e, 0xcc, 0xa5, 0x54,
0x76, 0x56, 0xc8, 0x0b, 0x77, 0xa1, 0xef, 0xf5,
0xcf, 0xd6, 0x84, 0x7a, 0x84, 0x0f, 0x4e, 0x16,
},
};
constexpr uint8_t kVConvIn2[8][32] = {
{
0x33, 0xc9, 0xb8, 0xa1, 0xea, 0x2d, 0x2c, 0x18,
0x92, 0x98, 0x8e, 0x19, 0xf2, 0xd8, 0x55, 0x92,
0x26, 0x4a, 0x8d, 0x3e, 0xb0, 0x01, 0x81, 0x6c,
0x3e, 0xcc, 0x8f, 0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x0e, 0x92, 0x62,
0x86, 0xad, 0xae, 0x38, 0x95, 0x7f, 0xde, 0x30,
0x9d, 0xbf, 0xe5, 0xb2, 0xb3, 0xb6, 0xf1, 0x42,
},
{
0x0c, 0xd7, 0xd4, 0xa8, 0xae, 0x1a, 0xe6, 0x3c,
0xf0, 0xd7, 0x4f, 0x36, 0x37, 0xeb, 0x1d, 0xe9,
0xc7, 0xe4, 0x82, 0xe4, 0x44, 0x1c, 0x6a, 0xa1,
0x96, 0xfe, 0x2e, 0x9d, 0x36, 0xb4, 0x1c, 0x03,
},
};
constexpr uint32_t kVConvOutRef[8][8] = {
{
0x002706b4, 0x00284ddd, 0x00279af7, 0x00293b6a,
0x00265a51, 0x0028f490, 0x0024222a, 0x0025a738,
},
{
0x00260af1, 0x002687fd, 0x0026d33e, 0x0028700b,
0x002701d0, 0x00273546, 0x0025002d, 0x00254eaa,
},
{
0x002b2935, 0x00262aea, 0x002ca80a, 0x00275a99,
0x002cc3e7, 0x0027e665, 0x00288ed7, 0x00254319,
},
{
0x0028690a, 0x0023f3b1, 0x002aed22, 0x0025a60b,
0x002ad4e5, 0x0024a4c3, 0x00283b5b, 0x0021ce1e,
},
{
0x0025e1a3, 0x002700e9, 0x00255faa, 0x00270fbc,
0x00257a3b, 0x0026dd70, 0x0025c9d7, 0x0026fcc3,
},
{
0x0025a025, 0x00258f27, 0x0024d04f, 0x00261465,
0x00244b49, 0x00269500, 0x0025ddb5, 0x0025ca26,
},
{
0x00299efe, 0x0025a702, 0x002a766b, 0x00269ec7,
0x002acd15, 0x0025366f, 0x002a4de2, 0x002568bf,
},
{
0x0029429d, 0x0023c5ba, 0x002a03f7, 0x00240475,
0x0028fac3, 0x0023f507, 0x0029f7e5, 0x0023008b,
},
};
// clang-format on
#endif // SIM_TEST_TESTFILES_KELVIN_VECTOR_CONVOLUTION_TESTDATA_H_