xmos-ai-tools 1.2.1.dev24__py3-none-win_amd64.whl → 1.3.2.dev180__py3-none-win_amd64.whl
This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
- xmos_ai_tools/__init__.py +7 -7
- xmos_ai_tools/io_server/__init__.py +151 -151
- xmos_ai_tools/runtime/buildfiles/aitoolslib.cmake +13 -13
- xmos_ai_tools/runtime/buildfiles/aitoolslib.make +8 -8
- xmos_ai_tools/runtime/include/flash_server.h +2 -3
- xmos_ai_tools/runtime/include/lib_nn/api/nn_layers.h +11 -51
- xmos_ai_tools/runtime/include/lib_nn/api/nn_op_utils.h +3 -0
- xmos_ai_tools/runtime/include/lib_nn/api/quadratic_approximation.h +1 -0
- xmos_ai_tools/runtime/include/lib_nn/api/version.h +2 -2
- xmos_ai_tools/runtime/include/lib_nn/api/vpu_memmove_word_aligned.h +15 -0
- xmos_ai_tools/runtime/include/lib_nn/api/vpu_memset_256.h +55 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/fast_flash.h +6 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/inference_engine.h +13 -13
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/load_weights.h +64 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/version.h +1 -1
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_config.h +1 -1
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_custom_options.h +2 -2
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_error_reporter.h +3 -3
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_interpreter.h +8 -8
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_ops.h +21 -7
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_profiler.h +4 -4
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_utils.h +5 -5
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/xud.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/array.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/context_util.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/core/api/error_reporter.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/core/api/flatbuffer_conversions.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/core/api/tensor_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/core/c/c_api_types.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/core/c/common.h +17 -17
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/common.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/cppmath.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/max.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/min.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/portable_tensor.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/portable_tensor_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/quantization_util.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/add.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/add_n.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/arg_min_max.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/batch_matmul.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/batch_to_space_nd.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/binary_function.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/broadcast_args.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/broadcast_to.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/ceil.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/comparisons.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/concatenation.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/cumsum.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/depth_to_space.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/depthwiseconv_float.h +1 -1
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/depthwiseconv_uint8.h +1 -1
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/dequantize.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/div.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/elu.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/exp.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/fill.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/floor.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/floor_div.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/floor_mod.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/fully_connected.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/hard_swish.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/add.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/depthwise_conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/fully_connected.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/l2normalization.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/logistic.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/mul.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/pooling.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/tanh.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/transpose_conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/l2normalization.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/leaky_relu.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/log_softmax.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/logistic.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/lstm_cell.h +5 -5
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/maximum_minimum.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/mul.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/neg.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/pad.h +8 -8
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/pooling.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/portable_tensor_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/portable_tensor_utils_impl.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/prelu.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/process_broadcast_shapes.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/quantize.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/reduce.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/requantize.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/resize_bilinear.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/resize_nearest_neighbor.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/round.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/select.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/slice.h +5 -5
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/softmax.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/space_to_batch_nd.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/space_to_depth.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/strided_slice.h +6 -6
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/sub.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/tanh.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/transpose.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/transpose_conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/runtime_shape.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/strided_slice_logic.h +9 -9
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/tensor_ctypes.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/types.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/kernel_util.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/padding.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/ibuffer_allocator.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/non_persistent_arena_buffer_allocator.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/persistent_arena_buffer_allocator.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/recording_single_arena_buffer_allocator.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/single_arena_buffer_allocator.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/benchmarks/micro_benchmark.h +7 -7
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/fake_micro_context.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/flatbuffer_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/activation_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/activations.h +6 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/add.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_function_specializations.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_interface.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_slicers.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_tf_utils.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/scratch_buf_mgr.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/scratch_buffers.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/ceva/types.h +6 -6
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/circular_buffer.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/conv_test.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/depthwise_conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/dequantize.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/ethosu.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/fully_connected.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/hard_swish.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/kernel_runner.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/kernel_util.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/leaky_relu.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/logical.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/logistic.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/lstm_eval.h +48 -48
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/lstm_eval_test.h +57 -57
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/lstm_shared.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/micro_ops.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/micro_tensor_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/mul.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/pad.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/pooling.h +15 -15
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/prelu.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/quantize.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/reduce.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/reshape.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/softmax.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/strided_slice.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/sub.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/svdf.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/testdata/conv_test_data.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/testdata/lstm_test_data.h +7 -7
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/unidirectional_sequence_lstm.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/hifimini/fixedpoint_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/lstm_eval.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/lstm_shared.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_add.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_depthwise_conv.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_fully_connected.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_pad.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_pooling.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_reduce.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_reshape.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_softmax.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_svdf.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_helpers.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/greedy_memory_planner.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/linear_memory_planner.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/memory_plan_struct.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/micro_memory_planner.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/non_persistent_buffer_planner_shim.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_allocation_info.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_allocator.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_arena_constants.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_context.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_graph.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_interpreter.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_interpreter_context.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_interpreter_graph.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_log.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_mutable_op_resolver.h +50 -50
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_op_resolver.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_profiler.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_profiler_interface.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_resource_variable.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_time.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/mock_micro_graph.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/python/tflite_size/src/flatbuffer_size.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/python/tflite_size/src/flatbuffer_size_wrapper.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/recording_micro_allocator.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/recording_micro_interpreter.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/system_setup.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/test_helper_custom_ops.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/test_helpers.h +6 -6
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/testing/micro_test.h +4 -4
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tflite_bridge/flatbuffer_conversions_bridge.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tflite_bridge/micro_error_reporter.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/log_utils.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/metrics.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/op_resolver.h +3 -3
- xmos_ai_tools/runtime/include/tensorflow/lite/portable_type_to_tflitetype.h +2 -2
- xmos_ai_tools/runtime/include/tensorflow/lite/schema/schema_generated.h +2731 -2731
- xmos_ai_tools/runtime/include/tensorflow/lite/schema/schema_utils.h +2 -2
- xmos_ai_tools/runtime/lib/host_xtflitemicro.lib +0 -0
- xmos_ai_tools/runtime/lib/libxtflitemicro.a +0 -0
- xmos_ai_tools/xformer/__init__.py +64 -60
- xmos_ai_tools/xformer/flash.py +190 -190
- xmos_ai_tools/xinterpreters/__init__.py +1 -1
- xmos_ai_tools/xinterpreters/exceptions.py +38 -38
- xmos_ai_tools/xinterpreters/host_interpreter.py +651 -652
- xmos_ai_tools/xinterpreters/libs/windows/xtflm_python.dll +0 -0
- {xmos_ai_tools-1.2.1.dev24.data → xmos_ai_tools-1.3.2.dev180.data}/data/Scripts/xcore-opt.exe +0 -0
- {xmos_ai_tools-1.2.1.dev24.dist-info → xmos_ai_tools-1.3.2.dev180.dist-info}/METADATA +5 -7
- {xmos_ai_tools-1.2.1.dev24.dist-info → xmos_ai_tools-1.3.2.dev180.dist-info}/RECORD +224 -222
- {xmos_ai_tools-1.2.1.dev24.dist-info → xmos_ai_tools-1.3.2.dev180.dist-info}/WHEEL +1 -1
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_common.h +0 -19
- {xmos_ai_tools-1.2.1.dev24.dist-info → xmos_ai_tools-1.3.2.dev180.dist-info}/top_level.txt +0 -0
@@ -18,7 +18,7 @@ limitations under the License.
|
|
18
18
|
#include "flatbuffers/flatbuffers.h"
|
19
19
|
#include "tensorflow/lite/schema/schema_generated.h"
|
20
20
|
|
21
|
-
namespace
|
21
|
+
namespace tflite_micro {
|
22
22
|
|
23
23
|
// The following methods are introduced to resolve op builtin code shortage
|
24
24
|
// problem. The new builtin operator will be assigned to the extended builtin
|
@@ -28,6 +28,6 @@ BuiltinOperator GetBuiltinCode(const OperatorCode *op_code);
|
|
28
28
|
|
29
29
|
BuiltinOperator GetBuiltinCode(const OperatorCodeT *op_code);
|
30
30
|
|
31
|
-
} // namespace
|
31
|
+
} // namespace tflite_micro
|
32
32
|
|
33
33
|
#endif // TENSORFLOW_LITE_SCHEMA_SCHEMA_UTILS_H_
|
Binary file
|
Binary file
|
@@ -1,60 +1,64 @@
|
|
1
|
-
import subprocess
|
2
|
-
import typing
|
3
|
-
from pathlib import Path
|
4
|
-
from typing import Union, List, Optional
|
5
|
-
from .flash import generate_flash
|
6
|
-
import re
|
7
|
-
|
8
|
-
|
9
|
-
|
10
|
-
|
11
|
-
|
12
|
-
|
13
|
-
|
14
|
-
|
15
|
-
|
16
|
-
|
17
|
-
|
18
|
-
|
19
|
-
|
20
|
-
|
21
|
-
|
22
|
-
|
23
|
-
|
24
|
-
|
25
|
-
|
26
|
-
|
27
|
-
|
28
|
-
|
29
|
-
|
30
|
-
|
31
|
-
|
32
|
-
|
33
|
-
|
34
|
-
|
35
|
-
|
36
|
-
|
37
|
-
|
38
|
-
|
39
|
-
|
40
|
-
|
41
|
-
|
42
|
-
|
43
|
-
|
44
|
-
|
45
|
-
|
46
|
-
|
47
|
-
|
48
|
-
|
49
|
-
|
50
|
-
|
51
|
-
|
52
|
-
|
53
|
-
|
54
|
-
|
55
|
-
|
56
|
-
|
57
|
-
|
58
|
-
|
59
|
-
|
60
|
-
|
1
|
+
import subprocess
|
2
|
+
import typing
|
3
|
+
from pathlib import Path
|
4
|
+
from typing import Union, List, Optional, Tuple
|
5
|
+
from .flash import generate_flash
|
6
|
+
import re
|
7
|
+
|
8
|
+
__compilation_stdout = ""
|
9
|
+
__compilation_stderr = ""
|
10
|
+
__arena_size = 0
|
11
|
+
|
12
|
+
|
13
|
+
def convert(
|
14
|
+
filename: Union[str, Path],
|
15
|
+
outfile: Union[str, Path],
|
16
|
+
params: Optional[List[Tuple[str, Optional[str]]]],
|
17
|
+
) -> int:
|
18
|
+
args: List[str] = ["xcore-opt", "-o", str(outfile)]
|
19
|
+
|
20
|
+
if params is not None:
|
21
|
+
for key, val in params:
|
22
|
+
if len(key) > 1:
|
23
|
+
flag: str = "--" + str(key)
|
24
|
+
else:
|
25
|
+
flag = "-" + str(key)
|
26
|
+
if str(val) == "" or val is None:
|
27
|
+
args.append(flag)
|
28
|
+
else:
|
29
|
+
args.append(f"{flag}={val}")
|
30
|
+
|
31
|
+
args.append(str(filename))
|
32
|
+
|
33
|
+
try:
|
34
|
+
process_call: subprocess.CompletedProcess = subprocess.run(
|
35
|
+
[arg for arg in args],
|
36
|
+
check=True, text=True, capture_output=True,
|
37
|
+
)
|
38
|
+
global __compilation_stdout, __compilation_stderr, __arena_size
|
39
|
+
__compilation_stdout = process_call.stdout
|
40
|
+
__compilation_stderr = process_call.stderr
|
41
|
+
size_str = re.sub("((.|\n|\r)*)Tensor arena size :", "", __compilation_stdout)
|
42
|
+
size_str = re.sub("(\n|\r)((.|\n|\r)*)", "", size_str)
|
43
|
+
__arena_size = int(size_str.strip())
|
44
|
+
return process_call.returncode
|
45
|
+
except subprocess.CalledProcessError as e:
|
46
|
+
print(e)
|
47
|
+
print("Return code:", e.returncode)
|
48
|
+
print("Error output:", e.stderr)
|
49
|
+
|
50
|
+
|
51
|
+
def tensor_arena_size() -> int:
|
52
|
+
return __arena_size
|
53
|
+
|
54
|
+
|
55
|
+
def print_optimization_report():
|
56
|
+
print(__compilation_stderr)
|
57
|
+
print(__compilation_stdout)
|
58
|
+
|
59
|
+
|
60
|
+
def print_help(show_hidden: Optional[bool] = False) -> int:
|
61
|
+
if show_hidden:
|
62
|
+
return subprocess.run(["xcore-opt", "--help-list-hidden"]).returncode
|
63
|
+
|
64
|
+
return subprocess.run(["xcore-opt", "--help-list"]).returncode
|
xmos_ai_tools/xformer/flash.py
CHANGED
@@ -1,190 +1,190 @@
|
|
1
|
-
BYTES_FOR_MAGIC_PATTERN = 32
|
2
|
-
BYTES_FOR_VERSION = 4
|
3
|
-
BYTES_PER_ENGINE_HEADER = 16
|
4
|
-
VERSION_MAJOR = 1
|
5
|
-
VERSION_MINOR = 2
|
6
|
-
|
7
|
-
|
8
|
-
class FlashBuilder:
|
9
|
-
class Header:
|
10
|
-
"""
|
11
|
-
Class that stores a header for a flash file system
|
12
|
-
The header comprises the addresses of the model, parameters, and operators
|
13
|
-
relative to the start address
|
14
|
-
"""
|
15
|
-
|
16
|
-
def __init__(self, model_bytes, params_bytes, ops_bytes, xip_bytes, start):
|
17
|
-
self.model_start = start
|
18
|
-
self.parameters_start = self.model_start + model_bytes + 4 # len
|
19
|
-
self.operators_start = self.parameters_start + params_bytes # no len
|
20
|
-
self.xip_start = self.operators_start + ops_bytes # no len
|
21
|
-
new_start = self.xip_start + xip_bytes # no len
|
22
|
-
self.length = new_start - start
|
23
|
-
|
24
|
-
def __init__(self, engines=1):
|
25
|
-
self.engines = engines
|
26
|
-
self.models = [bytes([])] * engines
|
27
|
-
self.params = [bytes([])] * engines
|
28
|
-
self.ops = [bytes([])] * engines
|
29
|
-
self.xips = [bytes([])] * engines
|
30
|
-
|
31
|
-
@staticmethod
|
32
|
-
def read_whole_binary_file(filename):
|
33
|
-
"""
|
34
|
-
Reads a whole binary file in and returns bytes(). If the file to be read is called '-'
|
35
|
-
then an empty bytes is returned.
|
36
|
-
"""
|
37
|
-
if filename == "-":
|
38
|
-
return bytes([])
|
39
|
-
try:
|
40
|
-
with open(filename, "rb") as input_fd:
|
41
|
-
contents = input_fd.read()
|
42
|
-
return contents
|
43
|
-
except:
|
44
|
-
print('File "%s" is not a readable file' % (filename))
|
45
|
-
return None
|
46
|
-
|
47
|
-
@staticmethod
|
48
|
-
def create_params_image(params=None, filename=None):
|
49
|
-
if params is None:
|
50
|
-
params = FlashBuilder.read_whole_binary_file(filename)
|
51
|
-
return params
|
52
|
-
|
53
|
-
@staticmethod
|
54
|
-
def create_model_image(model=None, filename=None):
|
55
|
-
if model is None:
|
56
|
-
model = FlashBuilder.read_whole_binary_file(filename)
|
57
|
-
return model
|
58
|
-
|
59
|
-
@staticmethod
|
60
|
-
def create_params_file(params_filename, params=None, input_filename=None):
|
61
|
-
image = FlashBuilder.create_params_image(params=params, filename=input_filename)
|
62
|
-
with open(params_filename, "wb") as output_fd:
|
63
|
-
output_fd.write(image)
|
64
|
-
|
65
|
-
@staticmethod
|
66
|
-
def tobytes(integr):
|
67
|
-
"""Converts an int to a LSB first quad of bytes"""
|
68
|
-
data = []
|
69
|
-
for i in range(4):
|
70
|
-
data.append((integr >> (8 * i)) & 0xFF)
|
71
|
-
return bytes(data)
|
72
|
-
|
73
|
-
@staticmethod
|
74
|
-
def swap_nibbles(x):
|
75
|
-
return (x & 0x0F) << 4 | (x & 0xF0) >> 4
|
76
|
-
|
77
|
-
def add_params(self, engine, params=None, filename=None):
|
78
|
-
image = FlashBuilder.create_params_image(params, filename)
|
79
|
-
self.params[engine] = image
|
80
|
-
|
81
|
-
def add_model(self, engine, model=None, filename=None):
|
82
|
-
image = FlashBuilder.create_model_image(model, filename)
|
83
|
-
self.models[engine] = image
|
84
|
-
|
85
|
-
def flash_image(self):
|
86
|
-
"""
|
87
|
-
Builds a flash image out of a collection of models and parameter blobs.
|
88
|
-
This function returns a bytes comprising the header, models, parameters, etc.
|
89
|
-
The whole thing should be written as is to flash
|
90
|
-
"""
|
91
|
-
headers = [None] * self.engines
|
92
|
-
start = (
|
93
|
-
BYTES_FOR_MAGIC_PATTERN
|
94
|
-
+ BYTES_FOR_VERSION
|
95
|
-
+ BYTES_PER_ENGINE_HEADER * self.engines
|
96
|
-
)
|
97
|
-
for i in range(self.engines):
|
98
|
-
headers[i] = FlashBuilder.Header(
|
99
|
-
len(self.models[i]),
|
100
|
-
len(self.params[i]),
|
101
|
-
len(self.ops[i]),
|
102
|
-
len(self.xips[i]),
|
103
|
-
start,
|
104
|
-
)
|
105
|
-
start += headers[i].length
|
106
|
-
|
107
|
-
# We add the magic fast flash pattern of 32 bytes at the very beginning
|
108
|
-
# After that comes the version
|
109
|
-
output = bytes(
|
110
|
-
[
|
111
|
-
0xFF,
|
112
|
-
0x00,
|
113
|
-
0x0F,
|
114
|
-
0x0F,
|
115
|
-
0x0F,
|
116
|
-
0x0F,
|
117
|
-
0x0F,
|
118
|
-
0x0F,
|
119
|
-
0xFF,
|
120
|
-
0x00,
|
121
|
-
0xFF,
|
122
|
-
0x00,
|
123
|
-
0xFF,
|
124
|
-
0x00,
|
125
|
-
0xFF,
|
126
|
-
0x00,
|
127
|
-
0x31,
|
128
|
-
0xF7,
|
129
|
-
0xCE,
|
130
|
-
0x08,
|
131
|
-
0x31,
|
132
|
-
0xF7,
|
133
|
-
0xCE,
|
134
|
-
0x08,
|
135
|
-
0x9C,
|
136
|
-
0x63,
|
137
|
-
0x9C,
|
138
|
-
0x63,
|
139
|
-
0x9C,
|
140
|
-
0x63,
|
141
|
-
0x9C,
|
142
|
-
0x63,
|
143
|
-
]
|
144
|
-
)
|
145
|
-
|
146
|
-
output += bytes(
|
147
|
-
[VERSION_MAJOR, VERSION_MINOR, 0xFF ^ VERSION_MAJOR, 0xFF ^ VERSION_MINOR]
|
148
|
-
)
|
149
|
-
|
150
|
-
for i in range(self.engines):
|
151
|
-
output += FlashBuilder.tobytes(
|
152
|
-
headers[i].model_start
|
153
|
-
) # encode start of model
|
154
|
-
output += FlashBuilder.tobytes(
|
155
|
-
headers[i].parameters_start
|
156
|
-
) # encode start of params
|
157
|
-
output += FlashBuilder.tobytes(
|
158
|
-
headers[i].operators_start
|
159
|
-
) # encode start of ops
|
160
|
-
output += FlashBuilder.tobytes(headers[i].xip_start) # encode start of xip
|
161
|
-
|
162
|
-
for i in range(self.engines):
|
163
|
-
output += FlashBuilder.tobytes(len(self.models[i])) # encode len of model
|
164
|
-
output += self.models[i] # add model image
|
165
|
-
output += self.params[i] # add params image
|
166
|
-
output += self.ops[i] # add operators image
|
167
|
-
output += self.xips[i] # add exec in place image
|
168
|
-
return output
|
169
|
-
|
170
|
-
def flash_file(self, filename):
|
171
|
-
"""
|
172
|
-
Builds a file for the host system that comprises a single parameter blob.
|
173
|
-
"""
|
174
|
-
output = self.flash_image()
|
175
|
-
# swap nibbles around
|
176
|
-
swapped_output = bytes([FlashBuilder.swap_nibbles(byte) for byte in output])
|
177
|
-
with open(filename, "wb") as output_fd:
|
178
|
-
output_fd.write(swapped_output)
|
179
|
-
|
180
|
-
|
181
|
-
def generate_flash(*, output_file, model_files, param_files):
|
182
|
-
assert len(model_files) == len(
|
183
|
-
param_files
|
184
|
-
), "The number of provided model files must match the number of param files!"
|
185
|
-
num_of_engines = len(model_files)
|
186
|
-
fb = FlashBuilder(engines=num_of_engines)
|
187
|
-
for i in range(num_of_engines):
|
188
|
-
fb.add_model(i, filename=model_files[i])
|
189
|
-
fb.add_params(i, filename=param_files[i])
|
190
|
-
fb.flash_file(output_file)
|
1
|
+
BYTES_FOR_MAGIC_PATTERN = 32
|
2
|
+
BYTES_FOR_VERSION = 4
|
3
|
+
BYTES_PER_ENGINE_HEADER = 16
|
4
|
+
VERSION_MAJOR = 1
|
5
|
+
VERSION_MINOR = 2
|
6
|
+
|
7
|
+
|
8
|
+
class FlashBuilder:
|
9
|
+
class Header:
|
10
|
+
"""
|
11
|
+
Class that stores a header for a flash file system
|
12
|
+
The header comprises the addresses of the model, parameters, and operators
|
13
|
+
relative to the start address
|
14
|
+
"""
|
15
|
+
|
16
|
+
def __init__(self, model_bytes, params_bytes, ops_bytes, xip_bytes, start):
|
17
|
+
self.model_start = start
|
18
|
+
self.parameters_start = self.model_start + model_bytes + 4 # len
|
19
|
+
self.operators_start = self.parameters_start + params_bytes # no len
|
20
|
+
self.xip_start = self.operators_start + ops_bytes # no len
|
21
|
+
new_start = self.xip_start + xip_bytes # no len
|
22
|
+
self.length = new_start - start
|
23
|
+
|
24
|
+
def __init__(self, engines=1):
|
25
|
+
self.engines = engines
|
26
|
+
self.models = [bytes([])] * engines
|
27
|
+
self.params = [bytes([])] * engines
|
28
|
+
self.ops = [bytes([])] * engines
|
29
|
+
self.xips = [bytes([])] * engines
|
30
|
+
|
31
|
+
@staticmethod
|
32
|
+
def read_whole_binary_file(filename):
|
33
|
+
"""
|
34
|
+
Reads a whole binary file in and returns bytes(). If the file to be read is called '-'
|
35
|
+
then an empty bytes is returned.
|
36
|
+
"""
|
37
|
+
if filename == "-":
|
38
|
+
return bytes([])
|
39
|
+
try:
|
40
|
+
with open(filename, "rb") as input_fd:
|
41
|
+
contents = input_fd.read()
|
42
|
+
return contents
|
43
|
+
except:
|
44
|
+
print('File "%s" is not a readable file' % (filename))
|
45
|
+
return None
|
46
|
+
|
47
|
+
@staticmethod
|
48
|
+
def create_params_image(params=None, filename=None):
|
49
|
+
if params is None:
|
50
|
+
params = FlashBuilder.read_whole_binary_file(filename)
|
51
|
+
return params
|
52
|
+
|
53
|
+
@staticmethod
|
54
|
+
def create_model_image(model=None, filename=None):
|
55
|
+
if model is None:
|
56
|
+
model = FlashBuilder.read_whole_binary_file(filename)
|
57
|
+
return model
|
58
|
+
|
59
|
+
@staticmethod
|
60
|
+
def create_params_file(params_filename, params=None, input_filename=None):
|
61
|
+
image = FlashBuilder.create_params_image(params=params, filename=input_filename)
|
62
|
+
with open(params_filename, "wb") as output_fd:
|
63
|
+
output_fd.write(image)
|
64
|
+
|
65
|
+
@staticmethod
|
66
|
+
def tobytes(integr):
|
67
|
+
"""Converts an int to a LSB first quad of bytes"""
|
68
|
+
data = []
|
69
|
+
for i in range(4):
|
70
|
+
data.append((integr >> (8 * i)) & 0xFF)
|
71
|
+
return bytes(data)
|
72
|
+
|
73
|
+
@staticmethod
|
74
|
+
def swap_nibbles(x):
|
75
|
+
return (x & 0x0F) << 4 | (x & 0xF0) >> 4
|
76
|
+
|
77
|
+
def add_params(self, engine, params=None, filename=None):
|
78
|
+
image = FlashBuilder.create_params_image(params, filename)
|
79
|
+
self.params[engine] = image
|
80
|
+
|
81
|
+
def add_model(self, engine, model=None, filename=None):
|
82
|
+
image = FlashBuilder.create_model_image(model, filename)
|
83
|
+
self.models[engine] = image
|
84
|
+
|
85
|
+
def flash_image(self):
|
86
|
+
"""
|
87
|
+
Builds a flash image out of a collection of models and parameter blobs.
|
88
|
+
This function returns a bytes comprising the header, models, parameters, etc.
|
89
|
+
The whole thing should be written as is to flash
|
90
|
+
"""
|
91
|
+
headers = [None] * self.engines
|
92
|
+
start = (
|
93
|
+
BYTES_FOR_MAGIC_PATTERN
|
94
|
+
+ BYTES_FOR_VERSION
|
95
|
+
+ BYTES_PER_ENGINE_HEADER * self.engines
|
96
|
+
)
|
97
|
+
for i in range(self.engines):
|
98
|
+
headers[i] = FlashBuilder.Header(
|
99
|
+
len(self.models[i]),
|
100
|
+
len(self.params[i]),
|
101
|
+
len(self.ops[i]),
|
102
|
+
len(self.xips[i]),
|
103
|
+
start,
|
104
|
+
)
|
105
|
+
start += headers[i].length
|
106
|
+
|
107
|
+
# We add the magic fast flash pattern of 32 bytes at the very beginning
|
108
|
+
# After that comes the version
|
109
|
+
output = bytes(
|
110
|
+
[
|
111
|
+
0xFF,
|
112
|
+
0x00,
|
113
|
+
0x0F,
|
114
|
+
0x0F,
|
115
|
+
0x0F,
|
116
|
+
0x0F,
|
117
|
+
0x0F,
|
118
|
+
0x0F,
|
119
|
+
0xFF,
|
120
|
+
0x00,
|
121
|
+
0xFF,
|
122
|
+
0x00,
|
123
|
+
0xFF,
|
124
|
+
0x00,
|
125
|
+
0xFF,
|
126
|
+
0x00,
|
127
|
+
0x31,
|
128
|
+
0xF7,
|
129
|
+
0xCE,
|
130
|
+
0x08,
|
131
|
+
0x31,
|
132
|
+
0xF7,
|
133
|
+
0xCE,
|
134
|
+
0x08,
|
135
|
+
0x9C,
|
136
|
+
0x63,
|
137
|
+
0x9C,
|
138
|
+
0x63,
|
139
|
+
0x9C,
|
140
|
+
0x63,
|
141
|
+
0x9C,
|
142
|
+
0x63,
|
143
|
+
]
|
144
|
+
)
|
145
|
+
|
146
|
+
output += bytes(
|
147
|
+
[VERSION_MAJOR, VERSION_MINOR, 0xFF ^ VERSION_MAJOR, 0xFF ^ VERSION_MINOR]
|
148
|
+
)
|
149
|
+
|
150
|
+
for i in range(self.engines):
|
151
|
+
output += FlashBuilder.tobytes(
|
152
|
+
headers[i].model_start
|
153
|
+
) # encode start of model
|
154
|
+
output += FlashBuilder.tobytes(
|
155
|
+
headers[i].parameters_start
|
156
|
+
) # encode start of params
|
157
|
+
output += FlashBuilder.tobytes(
|
158
|
+
headers[i].operators_start
|
159
|
+
) # encode start of ops
|
160
|
+
output += FlashBuilder.tobytes(headers[i].xip_start) # encode start of xip
|
161
|
+
|
162
|
+
for i in range(self.engines):
|
163
|
+
output += FlashBuilder.tobytes(len(self.models[i])) # encode len of model
|
164
|
+
output += self.models[i] # add model image
|
165
|
+
output += self.params[i] # add params image
|
166
|
+
output += self.ops[i] # add operators image
|
167
|
+
output += self.xips[i] # add exec in place image
|
168
|
+
return output
|
169
|
+
|
170
|
+
def flash_file(self, filename):
|
171
|
+
"""
|
172
|
+
Builds a file for the host system that comprises a single parameter blob.
|
173
|
+
"""
|
174
|
+
output = self.flash_image()
|
175
|
+
# swap nibbles around
|
176
|
+
swapped_output = bytes([FlashBuilder.swap_nibbles(byte) for byte in output])
|
177
|
+
with open(filename, "wb") as output_fd:
|
178
|
+
output_fd.write(swapped_output)
|
179
|
+
|
180
|
+
|
181
|
+
def generate_flash(*, output_file, model_files, param_files):
|
182
|
+
assert len(model_files) == len(
|
183
|
+
param_files
|
184
|
+
), "The number of provided model files must match the number of param files!"
|
185
|
+
num_of_engines = len(model_files)
|
186
|
+
fb = FlashBuilder(engines=num_of_engines)
|
187
|
+
for i in range(num_of_engines):
|
188
|
+
fb.add_model(i, filename=model_files[i])
|
189
|
+
fb.add_params(i, filename=param_files[i])
|
190
|
+
fb.flash_file(output_file)
|
@@ -1 +1 @@
|
|
1
|
-
from .host_interpreter import TFLMHostInterpreter
|
1
|
+
from .host_interpreter import TFLMHostInterpreter
|
@@ -1,38 +1,38 @@
|
|
1
|
-
# Copyright 2021 XMOS LIMITED. This Software is subject to the terms of the
|
2
|
-
# XMOS Public License: Version 1
|
3
|
-
|
4
|
-
|
5
|
-
class InterpreterError(Exception):
|
6
|
-
pass
|
7
|
-
|
8
|
-
|
9
|
-
class AllocateTensorsError(InterpreterError):
|
10
|
-
pass
|
11
|
-
|
12
|
-
|
13
|
-
class InvokeError(InterpreterError):
|
14
|
-
pass
|
15
|
-
|
16
|
-
|
17
|
-
class SetTensorError(InterpreterError):
|
18
|
-
pass
|
19
|
-
|
20
|
-
|
21
|
-
class GetTensorError(InterpreterError):
|
22
|
-
pass
|
23
|
-
|
24
|
-
|
25
|
-
class ModelSizeError(InterpreterError):
|
26
|
-
pass
|
27
|
-
|
28
|
-
|
29
|
-
class ArenaSizeError(InterpreterError):
|
30
|
-
pass
|
31
|
-
|
32
|
-
|
33
|
-
class DeviceTimeoutError(InterpreterError):
|
34
|
-
pass
|
35
|
-
|
36
|
-
|
37
|
-
class GetProfilerTimesError(InterpreterError):
|
38
|
-
pass
|
1
|
+
# Copyright 2021 XMOS LIMITED. This Software is subject to the terms of the
|
2
|
+
# XMOS Public License: Version 1
|
3
|
+
|
4
|
+
|
5
|
+
class InterpreterError(Exception):
|
6
|
+
pass
|
7
|
+
|
8
|
+
|
9
|
+
class AllocateTensorsError(InterpreterError):
|
10
|
+
pass
|
11
|
+
|
12
|
+
|
13
|
+
class InvokeError(InterpreterError):
|
14
|
+
pass
|
15
|
+
|
16
|
+
|
17
|
+
class SetTensorError(InterpreterError):
|
18
|
+
pass
|
19
|
+
|
20
|
+
|
21
|
+
class GetTensorError(InterpreterError):
|
22
|
+
pass
|
23
|
+
|
24
|
+
|
25
|
+
class ModelSizeError(InterpreterError):
|
26
|
+
pass
|
27
|
+
|
28
|
+
|
29
|
+
class ArenaSizeError(InterpreterError):
|
30
|
+
pass
|
31
|
+
|
32
|
+
|
33
|
+
class DeviceTimeoutError(InterpreterError):
|
34
|
+
pass
|
35
|
+
|
36
|
+
|
37
|
+
class GetProfilerTimesError(InterpreterError):
|
38
|
+
pass
|