Georgios Pinitas | 41df428 | 2023-05-30 12:20:31 +0100 | [diff] [blame] | 1 | // Copyright (c) 2023, ARM Limited. |
| 2 | // |
| 3 | // Licensed under the Apache License, Version 2.0 (the "License"); |
| 4 | // you may not use this file except in compliance with the License. |
| 5 | // You may obtain a copy of the License at |
| 6 | // |
| 7 | // http://www.apache.org/licenses/LICENSE-2.0 |
| 8 | // |
| 9 | // Unless required by applicable law or agreed to in writing, software |
| 10 | // distributed under the License is distributed on an "AS IS" BASIS, |
| 11 | // WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. |
| 12 | // See the License for the specific language governing permissions and |
| 13 | // limitations under the License. |
| 14 | //===----------------------------------------------------------------------===// |
| 15 | // |
| 16 | // Verification functionality as per TOSA Specification |
| 17 | // Output Verification : Section 1.8.2 |
| 18 | // |
| 19 | //===----------------------------------------------------------------------===// |
Jeremy Johnson | b20b0c9 | 2023-10-04 14:17:55 +0100 | [diff] [blame] | 20 | #ifndef VERIFY_H |
| 21 | #define VERIFY_H |
Georgios Pinitas | 41df428 | 2023-05-30 12:20:31 +0100 | [diff] [blame] | 22 | |
Georgios Pinitas | 7021ef0 | 2023-08-22 08:25:57 +0100 | [diff] [blame] | 23 | #include "types.h" |
Georgios Pinitas | 41df428 | 2023-05-30 12:20:31 +0100 | [diff] [blame] | 24 | |
| 25 | #ifdef __cplusplus |
Jerry Ge | 9c9c8da | 2023-07-19 23:08:16 +0000 | [diff] [blame] | 26 | extern "C" |
| 27 | { |
Georgios Pinitas | 41df428 | 2023-05-30 12:20:31 +0100 | [diff] [blame] | 28 | #endif /* __cplusplus */ |
| 29 | |
Georgios Pinitas | 7021ef0 | 2023-08-22 08:25:57 +0100 | [diff] [blame] | 30 | /// \brief Perform compliance validation between a reference and a target output |
Jerry Ge | 9c9c8da | 2023-07-19 23:08:16 +0000 | [diff] [blame] | 31 | /// |
Georgios Pinitas | 7021ef0 | 2023-08-22 08:25:57 +0100 | [diff] [blame] | 32 | /// A compliance configuration is expected as it provides information about |
| 33 | /// the type of validation to be performed alongside with all the relevant |
| 34 | /// meta-data. Configuration is provided in JSON format. |
Jerry Ge | 9c9c8da | 2023-07-19 23:08:16 +0000 | [diff] [blame] | 35 | /// |
Georgios Pinitas | 7021ef0 | 2023-08-22 08:25:57 +0100 | [diff] [blame] | 36 | /// \param ref Reference tensor to compare against |
| 37 | /// \param ref_bnd (Optional) Reference tensor when run on absolute inputs |
| 38 | /// \param imp Implementation resulting tensor |
| 39 | /// \param config_json Compliance configuration that indicates how and what compliance need to be performed |
Jerry Ge | 9c9c8da | 2023-07-19 23:08:16 +0000 | [diff] [blame] | 40 | /// |
Georgios Pinitas | 7021ef0 | 2023-08-22 08:25:57 +0100 | [diff] [blame] | 41 | /// \return True in case of successful validation else false |
| 42 | bool tvf_verify_data(const tosa_tensor_t* ref, |
| 43 | const tosa_tensor_t* ref_bnd, |
| 44 | const tosa_tensor_t* imp, |
| 45 | const char* config_json); |
Georgios Pinitas | 41df428 | 2023-05-30 12:20:31 +0100 | [diff] [blame] | 46 | |
| 47 | #ifdef __cplusplus |
| 48 | } |
Jeremy Johnson | b20b0c9 | 2023-10-04 14:17:55 +0100 | [diff] [blame] | 49 | #endif /* __cplusplus */ |
| 50 | |
| 51 | #endif // VERIFY_H |