Jeremy Johnson | b20b0c9 | 2023-10-04 14:17:55 +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 | // Data generation functionality as per TOSA Specification (5.2) |
| 17 | // |
| 18 | //===----------------------------------------------------------------------===// |
| 19 | #ifndef GENERATE_H |
| 20 | #define GENERATE_H |
| 21 | |
| 22 | #include <stddef.h> |
| 23 | |
| 24 | #ifdef __cplusplus |
| 25 | extern "C" |
| 26 | { |
| 27 | #endif /* __cplusplus */ |
| 28 | |
| 29 | /// \brief Perform input data generation for a given tensor |
| 30 | /// |
| 31 | /// A configuration provides context about the type of generator to be used e.g. Pseudo-random |
| 32 | /// alongside with information on the operator and the slot that the tensor is consumed by. |
| 33 | /// |
| 34 | /// \param config_json JSON configuration of the tensor that we need to generate data for |
| 35 | /// \param tensor_name Name of the tensor to extract generator information |
| 36 | /// \param data User-provided buffer to store the data to |
| 37 | /// \param size Size of the provided buffer in bytes |
| 38 | /// \return |
| 39 | bool tgd_generate_data(const char* config_json, const char* tensor_name, void* data, size_t size); |
| 40 | |
| 41 | #ifdef __cplusplus |
| 42 | } |
| 43 | #endif /* __cplusplus */ |
| 44 | |
| 45 | #endif // GENERATE_H |