xmos-ai-tools 1.2.1.dev20__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/add_int16_transform.h +2 -1
- xmos_ai_tools/runtime/include/lib_nn/api/dequantize_int16_transform.h +2 -1
- xmos_ai_tools/runtime/include/lib_nn/api/multiply_int16_transform.h +4 -2
- xmos_ai_tools/runtime/include/lib_nn/api/nn_api.h +2 -0
- 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.dev20.data → xmos_ai_tools-1.3.2.dev180.data}/data/Scripts/xcore-opt.exe +0 -0
- {xmos_ai_tools-1.2.1.dev20.dist-info → xmos_ai_tools-1.3.2.dev180.dist-info}/METADATA +5 -7
- {xmos_ai_tools-1.2.1.dev20.dist-info → xmos_ai_tools-1.3.2.dev180.dist-info}/RECORD +228 -226
- {xmos_ai_tools-1.2.1.dev20.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.dev20.dist-info → xmos_ai_tools-1.3.2.dev180.dist-info}/top_level.txt +0 -0
@@ -25,7 +25,7 @@ limitations under the License.
|
|
25
25
|
#include "tensorflow/lite/kernels/internal/types.h"
|
26
26
|
#include "tensorflow/lite/kernels/op_macros.h"
|
27
27
|
|
28
|
-
namespace
|
28
|
+
namespace tflite_micro {
|
29
29
|
namespace reference_ops {
|
30
30
|
|
31
31
|
inline void Softmax(const SoftmaxParams& params,
|
@@ -228,6 +228,6 @@ inline void SoftmaxInt16(const SoftmaxParams& params,
|
|
228
228
|
}
|
229
229
|
|
230
230
|
} // namespace reference_ops
|
231
|
-
} // namespace
|
231
|
+
} // namespace tflite_micro
|
232
232
|
|
233
233
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_SOFTMAX_H_
|
xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/space_to_batch_nd.h
CHANGED
@@ -21,7 +21,7 @@ limitations under the License.
|
|
21
21
|
#include "tensorflow/lite/kernels/internal/common.h"
|
22
22
|
#include "tensorflow/lite/kernels/internal/types.h"
|
23
23
|
|
24
|
-
namespace
|
24
|
+
namespace tflite_micro {
|
25
25
|
namespace reference_ops {
|
26
26
|
|
27
27
|
// TODO(b/135760455): Move this method anonymous namespace in a cc file.
|
@@ -104,6 +104,6 @@ inline void SpaceToBatchND(const SpaceToBatchParams& params,
|
|
104
104
|
}
|
105
105
|
|
106
106
|
} // namespace reference_ops
|
107
|
-
} // namespace
|
107
|
+
} // namespace tflite_micro
|
108
108
|
|
109
109
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_SPACE_TO_BATCH_ND_H_
|
@@ -19,11 +19,11 @@ limitations under the License.
|
|
19
19
|
|
20
20
|
#include "tensorflow/lite/kernels/internal/types.h"
|
21
21
|
|
22
|
-
namespace
|
22
|
+
namespace tflite_micro {
|
23
23
|
namespace reference_ops {
|
24
24
|
|
25
25
|
template <typename T>
|
26
|
-
inline void SpaceToDepth(const
|
26
|
+
inline void SpaceToDepth(const tflite_micro::SpaceToDepthParams& op_params,
|
27
27
|
const RuntimeShape& unextended_input_shape,
|
28
28
|
const T* input_data,
|
29
29
|
const RuntimeShape& unextended_output_shape,
|
@@ -75,6 +75,6 @@ inline void SpaceToDepth(const tflite::SpaceToDepthParams& op_params,
|
|
75
75
|
}
|
76
76
|
|
77
77
|
} // namespace reference_ops
|
78
|
-
} // namespace
|
78
|
+
} // namespace tflite_micro
|
79
79
|
|
80
80
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_SPACE_TO_DEPTH_H_
|
@@ -22,19 +22,19 @@ limitations under the License.
|
|
22
22
|
#include "tensorflow/lite/kernels/internal/strided_slice_logic.h"
|
23
23
|
#include "tensorflow/lite/kernels/internal/types.h"
|
24
24
|
|
25
|
-
namespace
|
25
|
+
namespace tflite_micro {
|
26
26
|
|
27
27
|
namespace reference_ops {
|
28
28
|
|
29
29
|
template <typename T>
|
30
|
-
inline void StridedSlice(const
|
30
|
+
inline void StridedSlice(const tflite_micro::StridedSliceParams& op_params,
|
31
31
|
const RuntimeShape& unextended_input_shape,
|
32
32
|
const RuntimeShape& unextended_output_shape,
|
33
33
|
SequentialTensorWriter<T>* writer) {
|
34
34
|
ruy::profiler::ScopeLabel label("StridedSlice");
|
35
35
|
|
36
36
|
// Note that the output_shape is not used herein.
|
37
|
-
|
37
|
+
tflite_micro::StridedSliceParams params_copy = op_params;
|
38
38
|
|
39
39
|
TFLITE_DCHECK_LE(unextended_input_shape.DimensionsCount(), 5);
|
40
40
|
TFLITE_DCHECK_LE(unextended_output_shape.DimensionsCount(), 5);
|
@@ -120,7 +120,7 @@ inline void StridedSlice(const tflite::StridedSliceParams& op_params,
|
|
120
120
|
}
|
121
121
|
|
122
122
|
template <typename T>
|
123
|
-
inline void StridedSlice(const
|
123
|
+
inline void StridedSlice(const tflite_micro::StridedSliceParams& op_params,
|
124
124
|
const RuntimeShape& unextended_input_shape,
|
125
125
|
const T* input_data,
|
126
126
|
const RuntimeShape& unextended_output_shape,
|
@@ -131,7 +131,7 @@ inline void StridedSlice(const tflite::StridedSliceParams& op_params,
|
|
131
131
|
}
|
132
132
|
|
133
133
|
template <typename T>
|
134
|
-
inline void StridedSlice(const
|
134
|
+
inline void StridedSlice(const tflite_micro::StridedSliceParams& op_params,
|
135
135
|
const RuntimeShape& unextended_input_shape,
|
136
136
|
const TfLiteTensor* input,
|
137
137
|
const RuntimeShape& unextended_output_shape,
|
@@ -142,6 +142,6 @@ inline void StridedSlice(const tflite::StridedSliceParams& op_params,
|
|
142
142
|
}
|
143
143
|
|
144
144
|
} // namespace reference_ops
|
145
|
-
} // namespace
|
145
|
+
} // namespace tflite_micro
|
146
146
|
|
147
147
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_STRIDED_SLICE_H_
|
@@ -26,7 +26,7 @@ limitations under the License.
|
|
26
26
|
#include "tensorflow/lite/kernels/internal/compatibility.h"
|
27
27
|
#include "tensorflow/lite/kernels/internal/types.h"
|
28
28
|
|
29
|
-
namespace
|
29
|
+
namespace tflite_micro {
|
30
30
|
|
31
31
|
namespace reference_ops {
|
32
32
|
|
@@ -460,6 +460,6 @@ inline void SubWithActivation(
|
|
460
460
|
}
|
461
461
|
|
462
462
|
} // namespace reference_ops
|
463
|
-
} // namespace
|
463
|
+
} // namespace tflite_micro
|
464
464
|
|
465
465
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_SUB_H_
|
@@ -23,7 +23,7 @@ limitations under the License.
|
|
23
23
|
#include "tensorflow/lite/kernels/internal/types.h"
|
24
24
|
#include "tensorflow/lite/kernels/op_macros.h"
|
25
25
|
|
26
|
-
namespace
|
26
|
+
namespace tflite_micro {
|
27
27
|
namespace reference_ops {
|
28
28
|
|
29
29
|
inline void Tanh(const RuntimeShape& input_shape, const float* input_data,
|
@@ -124,6 +124,6 @@ inline void Tanh(const TanhParams& params, const RuntimeShape& input_shape,
|
|
124
124
|
}
|
125
125
|
|
126
126
|
} // namespace reference_ops
|
127
|
-
} // namespace
|
127
|
+
} // namespace tflite_micro
|
128
128
|
|
129
129
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_TANH_H_
|
@@ -19,7 +19,7 @@ limitations under the License.
|
|
19
19
|
|
20
20
|
#include "tensorflow/lite/kernels/internal/types.h"
|
21
21
|
|
22
|
-
namespace
|
22
|
+
namespace tflite_micro {
|
23
23
|
|
24
24
|
namespace reference_ops {
|
25
25
|
|
@@ -198,6 +198,6 @@ void Transpose(const TransposeParams& params, const RuntimeShape& input_shape,
|
|
198
198
|
}
|
199
199
|
|
200
200
|
} // namespace reference_ops
|
201
|
-
} // namespace
|
201
|
+
} // namespace tflite_micro
|
202
202
|
|
203
203
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_TRANSPOSE_H_
|
@@ -20,7 +20,7 @@ limitations under the License.
|
|
20
20
|
#include "tensorflow/lite/kernels/internal/common.h"
|
21
21
|
#include "tensorflow/lite/kernels/internal/types.h"
|
22
22
|
|
23
|
-
namespace
|
23
|
+
namespace tflite_micro {
|
24
24
|
|
25
25
|
namespace reference_ops {
|
26
26
|
|
@@ -220,6 +220,6 @@ inline void TransposeConv(
|
|
220
220
|
}
|
221
221
|
|
222
222
|
} // namespace reference_ops
|
223
|
-
} // namespace
|
223
|
+
} // namespace tflite_micro
|
224
224
|
|
225
225
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_TRANSPOSE_CONV_H_
|
@@ -19,7 +19,7 @@ limitations under the License.
|
|
19
19
|
|
20
20
|
#include "tensorflow/lite/kernels/internal/compatibility.h"
|
21
21
|
|
22
|
-
namespace
|
22
|
+
namespace tflite_micro {
|
23
23
|
|
24
24
|
template <int N>
|
25
25
|
struct Dims {
|
@@ -163,6 +163,6 @@ inline int Offset(const RuntimeShape& shape, int i0, int i1, int i2, int i3,
|
|
163
163
|
i4;
|
164
164
|
}
|
165
165
|
|
166
|
-
} // namespace
|
166
|
+
} // namespace tflite_micro
|
167
167
|
|
168
168
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_RUNTIME_SHAPE_H_
|
@@ -22,7 +22,7 @@ limitations under the License.
|
|
22
22
|
#include "tensorflow/lite/kernels/internal/compatibility.h"
|
23
23
|
#include "tensorflow/lite/kernels/internal/types.h"
|
24
24
|
|
25
|
-
namespace
|
25
|
+
namespace tflite_micro {
|
26
26
|
namespace strided_slice {
|
27
27
|
|
28
28
|
// Use until std::clamp() is available from C++17.
|
@@ -33,7 +33,7 @@ inline int Clamp(const int v, const int lo, const int hi) {
|
|
33
33
|
return v;
|
34
34
|
}
|
35
35
|
|
36
|
-
inline void StridedSlicePadIndices(
|
36
|
+
inline void StridedSlicePadIndices(tflite_micro::StridedSliceParams* p,
|
37
37
|
int dim_count) {
|
38
38
|
// Add indices and mask bits to fully include extra dimensions
|
39
39
|
TFLITE_CHECK_LE(dim_count, 5);
|
@@ -72,7 +72,7 @@ inline void StridedSlicePadIndices(tflite::StridedSliceParams* p,
|
|
72
72
|
// Return the index for the first element along that axis. This index will be a
|
73
73
|
// positive integer between [0, axis_size] (or [-1, axis_size -1] if stride < 0)
|
74
74
|
// that can be used to index directly into the data.
|
75
|
-
inline int StridedSliceStartForAxis(const
|
75
|
+
inline int StridedSliceStartForAxis(const tflite_micro::StridedSliceParams& params,
|
76
76
|
const RuntimeShape& input_shape,
|
77
77
|
int32_t axis) {
|
78
78
|
const int32_t axis_size = input_shape.Dims(axis);
|
@@ -97,7 +97,7 @@ inline int StridedSliceStartForAxis(const tflite::StridedSliceParams& params,
|
|
97
97
|
return start;
|
98
98
|
}
|
99
99
|
|
100
|
-
inline int StridedSliceEndForAxis(const
|
100
|
+
inline int StridedSliceEndForAxis(const tflite_micro::StridedSliceParams& params,
|
101
101
|
const RuntimeShape& input_shape, int axis,
|
102
102
|
int start) {
|
103
103
|
const auto shrink_axis_mask = params.shrink_axis_mask;
|
@@ -139,7 +139,7 @@ inline int StridedSliceEndForAxis(const tflite::StridedSliceParams& params,
|
|
139
139
|
// Return the index for the first element along that axis. This index will be a
|
140
140
|
// positive integer between [0, axis_size] (or [-1, axis_size -1] if stride < 0)
|
141
141
|
// that can be used to index directly into the data.
|
142
|
-
inline int StartForAxis(const
|
142
|
+
inline int StartForAxis(const tflite_micro::StridedSliceParams& params,
|
143
143
|
const RuntimeShape& input_shape, int axis) {
|
144
144
|
const auto begin_mask = params.begin_mask;
|
145
145
|
const auto* start_indices = params.start_indices;
|
@@ -186,7 +186,7 @@ inline int StartForAxis(const tflite::StridedSliceParams& params,
|
|
186
186
|
// element. ie. So if you were iterating through all elements of a 1D array of
|
187
187
|
// size 4, this function would return 4 as the stop, because it is one past the
|
188
188
|
// "real" indices of 0, 1, 2 & 3.
|
189
|
-
inline int StopForAxis(const
|
189
|
+
inline int StopForAxis(const tflite_micro::StridedSliceParams& params,
|
190
190
|
const RuntimeShape& input_shape, int axis,
|
191
191
|
int start_for_axis) {
|
192
192
|
const auto end_mask = params.end_mask;
|
@@ -246,11 +246,11 @@ inline bool LoopCondition(int index, int stop, int stride) {
|
|
246
246
|
return stride > 0 ? index >= stop : index <= stop;
|
247
247
|
}
|
248
248
|
|
249
|
-
inline
|
249
|
+
inline tflite_micro::StridedSliceParams BuildStridedSliceParams(
|
250
250
|
int begin_mask, int end_mask, int shrink_axis_mask,
|
251
251
|
const std::vector<int>& start_indices, const std::vector<int>& stop_indices,
|
252
252
|
const std::vector<int>& strides) {
|
253
|
-
|
253
|
+
tflite_micro::StridedSliceParams op_params{};
|
254
254
|
const int dims_count = start_indices.size();
|
255
255
|
|
256
256
|
op_params.start_indices_count = dims_count;
|
@@ -273,6 +273,6 @@ inline tflite::StridedSliceParams BuildStridedSliceParams(
|
|
273
273
|
|
274
274
|
} // namespace strided_slice
|
275
275
|
|
276
|
-
} // namespace
|
276
|
+
} // namespace tflite_micro
|
277
277
|
|
278
278
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_STRIDED_SLICE_LOGIC_H_
|
@@ -21,7 +21,7 @@ limitations under the License.
|
|
21
21
|
#include "tensorflow/lite/core/macros.h"
|
22
22
|
#include "tensorflow/lite/kernels/internal/types.h"
|
23
23
|
|
24
|
-
namespace
|
24
|
+
namespace tflite_micro {
|
25
25
|
|
26
26
|
template <typename T>
|
27
27
|
inline T* GetTensorData(TfLiteTensor* tensor) {
|
@@ -37,6 +37,6 @@ inline const T* GetTensorData(const TfLiteTensor* tensor) {
|
|
37
37
|
TFLITE_NOINLINE RuntimeShape GetTensorShape(const TfLiteTensor* tensor);
|
38
38
|
RuntimeShape GetTensorShape(std::vector<int32_t> data);
|
39
39
|
|
40
|
-
} // namespace
|
40
|
+
} // namespace tflite_micro
|
41
41
|
|
42
42
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_TENSOR_CTYPES_H_
|
@@ -23,7 +23,7 @@ limitations under the License.
|
|
23
23
|
#include "tensorflow/lite/kernels/internal/compatibility.h"
|
24
24
|
#include "tensorflow/lite/kernels/internal/runtime_shape.h"
|
25
25
|
|
26
|
-
namespace
|
26
|
+
namespace tflite_micro {
|
27
27
|
|
28
28
|
enum class FusedActivationFunctionType : uint8_t {
|
29
29
|
kNone,
|
@@ -1091,6 +1091,6 @@ struct is_int32_or_int64
|
|
1091
1091
|
std::is_same<T, int64_t>::value> {
|
1092
1092
|
};
|
1093
1093
|
|
1094
|
-
} // namespace
|
1094
|
+
} // namespace tflite_micro
|
1095
1095
|
|
1096
1096
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_TYPES_H_
|
@@ -28,7 +28,7 @@ limitations under the License.
|
|
28
28
|
#include "tensorflow/lite/kernels/op_macros.h"
|
29
29
|
#endif
|
30
30
|
|
31
|
-
namespace
|
31
|
+
namespace tflite_micro {
|
32
32
|
|
33
33
|
// A fair number of functions in this header have historically been inline.
|
34
34
|
// It is ok to change functions to not be inline if the latency with
|
@@ -336,6 +336,6 @@ bool IsMobilePlatform();
|
|
336
336
|
// Returns whether there is unspecified dimension in the tensor's dim signature.
|
337
337
|
bool HasUnspecifiedDimension(const TfLiteTensor* tensor);
|
338
338
|
|
339
|
-
} // namespace
|
339
|
+
} // namespace tflite_micro
|
340
340
|
|
341
341
|
#endif // TENSORFLOW_LITE_KERNELS_KERNEL_UTIL_H_
|
@@ -18,7 +18,7 @@ limitations under the License.
|
|
18
18
|
#include "tensorflow/lite/core/c/builtin_op_data.h"
|
19
19
|
#include "tensorflow/lite/kernels/internal/types.h"
|
20
20
|
|
21
|
-
namespace
|
21
|
+
namespace tflite_micro {
|
22
22
|
|
23
23
|
inline int ComputePadding(int stride, int dilation_rate, int in_size,
|
24
24
|
int filter_size, int out_size) {
|
@@ -110,6 +110,6 @@ inline Padding3DValues ComputePadding3DValues(
|
|
110
110
|
padding_values.width_offset = offset;
|
111
111
|
return padding_values;
|
112
112
|
}
|
113
|
-
} // namespace
|
113
|
+
} // namespace tflite_micro
|
114
114
|
|
115
115
|
#endif // TENSORFLOW_LITE_KERNELS_PADDING_H_
|
@@ -20,7 +20,7 @@ limitations under the License.
|
|
20
20
|
|
21
21
|
#include "tensorflow/lite/c/c_api_types.h"
|
22
22
|
|
23
|
-
namespace
|
23
|
+
namespace tflite_micro {
|
24
24
|
// Interface classes that the TFLM framework relies on to get buffers it needs.
|
25
25
|
// There are two types of buffers that the TFLM framework requires: persistent
|
26
26
|
// and non-persistent. Persistent buffers, once allocated, are never freed by
|
@@ -95,6 +95,6 @@ class INonPersistentBufferAllocator {
|
|
95
95
|
virtual size_t GetAvailableMemory(size_t alignment) const = 0;
|
96
96
|
};
|
97
97
|
|
98
|
-
} // namespace
|
98
|
+
} // namespace tflite_micro
|
99
99
|
|
100
100
|
#endif // TENSORFLOW_LITE_MICRO_ARENA_ALLOCATOR_IBUFFER_ALLOCATOR_H_
|
@@ -22,7 +22,7 @@ limitations under the License.
|
|
22
22
|
#include "tensorflow/lite/micro/arena_allocator/ibuffer_allocator.h"
|
23
23
|
#include "tensorflow/lite/micro/compatibility.h"
|
24
24
|
|
25
|
-
namespace
|
25
|
+
namespace tflite_micro {
|
26
26
|
|
27
27
|
// Implement INonPersistentBufferAllocator on an arena that is dedicated for
|
28
28
|
// non-persistent buffers.
|
@@ -99,6 +99,6 @@ class NonPersistentArenaBufferAllocator : public INonPersistentBufferAllocator {
|
|
99
99
|
bool resizable_buffer_allocated_ = false;
|
100
100
|
};
|
101
101
|
|
102
|
-
} // namespace
|
102
|
+
} // namespace tflite_micro
|
103
103
|
|
104
104
|
#endif // TENSORFLOW_LITE_MICRO_ARENA_ALLOCATOR_NON_PERSISTENT_ARENA_BUFFER_ALLOCATOR_H_
|
@@ -22,7 +22,7 @@ limitations under the License.
|
|
22
22
|
#include "tensorflow/lite/micro/arena_allocator/ibuffer_allocator.h"
|
23
23
|
#include "tensorflow/lite/micro/compatibility.h"
|
24
24
|
|
25
|
-
namespace
|
25
|
+
namespace tflite_micro {
|
26
26
|
|
27
27
|
// PersistentArenaBufferAllocator is an implementatation of
|
28
28
|
// IPersistentBufferAllocator interface on an arena that is dedicated for
|
@@ -53,6 +53,6 @@ class PersistentArenaBufferAllocator : public IPersistentBufferAllocator {
|
|
53
53
|
uint8_t* tail_temp_;
|
54
54
|
};
|
55
55
|
|
56
|
-
} // namespace
|
56
|
+
} // namespace tflite_micro
|
57
57
|
|
58
58
|
#endif // TENSORFLOW_LITE_MICRO_ARENA_ALLOCATOR_PERSISTENT_ARENA_BUFFER_ALLOCATOR_H_
|
@@ -19,7 +19,7 @@ limitations under the License.
|
|
19
19
|
#include "tensorflow/lite/micro/arena_allocator/single_arena_buffer_allocator.h"
|
20
20
|
#include "tensorflow/lite/micro/compatibility.h"
|
21
21
|
|
22
|
-
namespace
|
22
|
+
namespace tflite_micro {
|
23
23
|
|
24
24
|
// Utility class used to log allocations of a SingleArenaBufferAllocator. Should
|
25
25
|
// only be used in debug/evaluation settings or unit tests to evaluate
|
@@ -58,6 +58,6 @@ class RecordingSingleArenaBufferAllocator : public SingleArenaBufferAllocator {
|
|
58
58
|
TF_LITE_REMOVE_VIRTUAL_DELETE
|
59
59
|
};
|
60
60
|
|
61
|
-
} // namespace
|
61
|
+
} // namespace tflite_micro
|
62
62
|
|
63
63
|
#endif // TENSORFLOW_LITE_MICRO_ARENA_ALLOCATOR_RECORDING_SINGLE_ARENA_BUFFER_ALLOCATOR_H_
|
xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/single_arena_buffer_allocator.h
CHANGED
@@ -23,7 +23,7 @@ limitations under the License.
|
|
23
23
|
#include "tensorflow/lite/micro/arena_allocator/ibuffer_allocator.h"
|
24
24
|
#include "tensorflow/lite/micro/compatibility.h"
|
25
25
|
|
26
|
-
namespace
|
26
|
+
namespace tflite_micro {
|
27
27
|
|
28
28
|
// TODO(petewarden): This allocator never frees up or reuses any memory, even
|
29
29
|
// though we have enough information about lifetimes of the tensors to do so.
|
@@ -139,6 +139,6 @@ class SingleArenaBufferAllocator : public INonPersistentBufferAllocator,
|
|
139
139
|
int temp_buffer_count_ = 0;
|
140
140
|
};
|
141
141
|
|
142
|
-
} // namespace
|
142
|
+
} // namespace tflite_micro
|
143
143
|
|
144
144
|
#endif // TENSORFLOW_LITE_MICRO_ARENA_ALLOCATOR_SINGLE_ARENA_BUFFER_ALLOCATOR_H_
|
@@ -25,7 +25,7 @@ limitations under the License.
|
|
25
25
|
#include "tensorflow/lite/micro/micro_time.h"
|
26
26
|
#include "tensorflow/lite/micro/recording_micro_interpreter.h"
|
27
27
|
|
28
|
-
namespace
|
28
|
+
namespace tflite_micro {
|
29
29
|
|
30
30
|
template <typename inputT>
|
31
31
|
class MicroBenchmarkRunner {
|
@@ -33,7 +33,7 @@ class MicroBenchmarkRunner {
|
|
33
33
|
// The lifetimes of model, op_resolver, tensor_arena, profiler must exceed
|
34
34
|
// that of the created MicroBenchmarkRunner object.
|
35
35
|
MicroBenchmarkRunner(const uint8_t* model,
|
36
|
-
const
|
36
|
+
const tflite_micro::MicroOpResolver* op_resolver,
|
37
37
|
uint8_t* tensor_arena, int tensor_arena_size,
|
38
38
|
MicroProfilerInterface* profiler,
|
39
39
|
int num_resource_variables = 0)
|
@@ -63,7 +63,7 @@ class MicroBenchmarkRunner {
|
|
63
63
|
|
64
64
|
// Pre-populate input tensor with random values.
|
65
65
|
int input_length = input->bytes / sizeof(inputT);
|
66
|
-
inputT* input_values =
|
66
|
+
inputT* input_values = tflite_micro::GetTensorData<inputT>(input);
|
67
67
|
for (int i = 0; i < input_length; i++) {
|
68
68
|
// Pre-populate input tensor with a random value based on a constant seed.
|
69
69
|
input_values[i] = static_cast<inputT>(
|
@@ -74,7 +74,7 @@ class MicroBenchmarkRunner {
|
|
74
74
|
|
75
75
|
void SetInput(const inputT* custom_input, int input_index = 0) {
|
76
76
|
TfLiteTensor* input = interpreter_.input(input_index);
|
77
|
-
inputT* input_buffer =
|
77
|
+
inputT* input_buffer = tflite_micro::GetTensorData<inputT>(input);
|
78
78
|
int input_length = input->bytes / sizeof(inputT);
|
79
79
|
for (int i = 0; i < input_length; i++) {
|
80
80
|
input_buffer[i] = custom_input[i];
|
@@ -86,10 +86,10 @@ class MicroBenchmarkRunner {
|
|
86
86
|
}
|
87
87
|
|
88
88
|
private:
|
89
|
-
|
90
|
-
|
89
|
+
tflite_micro::RecordingMicroAllocator* allocator_;
|
90
|
+
tflite_micro::RecordingMicroInterpreter interpreter_;
|
91
91
|
};
|
92
92
|
|
93
|
-
} // namespace
|
93
|
+
} // namespace tflite_micro
|
94
94
|
|
95
95
|
#endif // TENSORFLOW_LITE_MICRO_BENCHMARKS_MICRO_BENCHMARK_H_
|
@@ -19,7 +19,7 @@ limitations under the License.
|
|
19
19
|
#include "tensorflow/lite/micro/micro_context.h"
|
20
20
|
#include "tensorflow/lite/micro/micro_graph.h"
|
21
21
|
|
22
|
-
namespace
|
22
|
+
namespace tflite_micro {
|
23
23
|
// A fake of MicroContext for kernel util tests.
|
24
24
|
// TODO(b/272759060): FakeMicroContext currently inherits from MicroContext.
|
25
25
|
// Which allow tests to use functions from MicroContext that weren't added to
|
@@ -65,6 +65,6 @@ class FakeMicroContext : public MicroContext {
|
|
65
65
|
TF_LITE_REMOVE_VIRTUAL_DELETE
|
66
66
|
};
|
67
67
|
|
68
|
-
} // namespace
|
68
|
+
} // namespace tflite_micro
|
69
69
|
|
70
70
|
#endif // TENSORFLOW_LITE_MICRO_FAKE_MICRO_CONTEXT_H_
|
@@ -21,7 +21,7 @@ limitations under the License.
|
|
21
21
|
#include "tensorflow/lite/c/common.h"
|
22
22
|
#include "tensorflow/lite/schema/schema_generated.h"
|
23
23
|
|
24
|
-
namespace
|
24
|
+
namespace tflite_micro {
|
25
25
|
// Kernels use flexbuffers::Map to pack their init parameters in a tflite file,
|
26
26
|
// with the parameter names as map keys and the parameter values as the
|
27
27
|
// corresponding map values.
|
@@ -60,6 +60,6 @@ TfLiteIntArray* FlatBufferVectorToTfLiteTypeArray(
|
|
60
60
|
TfLiteFloatArray* FlatBufferVectorToTfLiteTypeArray(
|
61
61
|
const flatbuffers::Vector<float>* flatbuffer_array);
|
62
62
|
|
63
|
-
} // namespace
|
63
|
+
} // namespace tflite_micro
|
64
64
|
|
65
65
|
#endif // THIRD_PARTY_TFLITE_MICRO_TENSORFLOW_LITE_MICRO_FLATBUFFER_UTILS_H_
|
@@ -24,7 +24,7 @@ limitations under the License.
|
|
24
24
|
#include "tensorflow/lite/kernels/internal/max.h"
|
25
25
|
#include "tensorflow/lite/kernels/internal/min.h"
|
26
26
|
|
27
|
-
namespace
|
27
|
+
namespace tflite_micro {
|
28
28
|
namespace ops {
|
29
29
|
namespace micro {
|
30
30
|
|
@@ -52,6 +52,6 @@ inline float ActivationValFloat(TfLiteFusedActivation act, float a) {
|
|
52
52
|
|
53
53
|
} // namespace micro
|
54
54
|
} // namespace ops
|
55
|
-
} // namespace
|
55
|
+
} // namespace tflite_micro
|
56
56
|
|
57
57
|
#endif // TENSORFLOW_LITE_MICRO_KERNELS_ACTIVATION_UTILS_H_
|
@@ -22,7 +22,7 @@ limitations under the License.
|
|
22
22
|
#include "tensorflow/lite/c/common.h"
|
23
23
|
#include "tensorflow/lite/kernels/internal/types.h"
|
24
24
|
|
25
|
-
namespace
|
25
|
+
namespace tflite_micro {
|
26
26
|
|
27
27
|
extern const int kActivationsInputTensor;
|
28
28
|
extern const int kActivationsOutputTensor;
|
@@ -55,10 +55,14 @@ void Relu6Quantized(int8_t lower, int8_t upper, const RuntimeShape& input_shape,
|
|
55
55
|
const int8_t* input_data, const RuntimeShape& output_shape,
|
56
56
|
int8_t* output_data);
|
57
57
|
|
58
|
+
void Relu6Quantized(int16_t lower, int16_t upper, const RuntimeShape& input_shape,
|
59
|
+
const int16_t* input_data, const RuntimeShape& output_shape,
|
60
|
+
int16_t* output_data);
|
61
|
+
|
58
62
|
TfLiteStatus ReluPrepare(TfLiteContext* context, TfLiteNode* node);
|
59
63
|
|
60
64
|
TfLiteStatus Relu6Prepare(TfLiteContext* context, TfLiteNode* node);
|
61
65
|
|
62
|
-
} // namespace
|
66
|
+
} // namespace tflite_micro
|
63
67
|
|
64
68
|
#endif // TENSORFLOW_LITE_MICRO_KERNELS_ACTIVATIONS_H_
|
@@ -22,7 +22,7 @@ limitations under the License.
|
|
22
22
|
#include "tensorflow/lite/c/common.h"
|
23
23
|
#include "tensorflow/lite/micro/micro_common.h"
|
24
24
|
|
25
|
-
namespace
|
25
|
+
namespace tflite_micro {
|
26
26
|
|
27
27
|
extern const int kAddInputTensor1;
|
28
28
|
extern const int kAddInputTensor2;
|
@@ -73,6 +73,6 @@ inline TFLMRegistration Register_ADD_INT8() { return Register_ADD(); }
|
|
73
73
|
|
74
74
|
inline TFLMRegistration Register_ADD_INT16() { return Register_ADD(); }
|
75
75
|
#endif
|
76
|
-
} // namespace
|
76
|
+
} // namespace tflite_micro
|
77
77
|
|
78
78
|
#endif // TENSORFLOW_LITE_MICRO_KERNELS_ADD_H_
|
xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_function_specializations.h
CHANGED
@@ -15,7 +15,7 @@ limitations under the License.
|
|
15
15
|
|
16
16
|
#include "mli_api.h" // NOLINT
|
17
17
|
|
18
|
-
namespace
|
18
|
+
namespace tflite_micro {
|
19
19
|
|
20
20
|
// Convolution specialized function.
|
21
21
|
typedef mli_status (*conv_func_ptr)(const mli_tensor* /*in*/,
|
@@ -138,4 +138,4 @@ mli_krn_maxpool(const mli_pool_cfg* cfg) {
|
|
138
138
|
}
|
139
139
|
#endif
|
140
140
|
|
141
|
-
} // namespace
|
141
|
+
} // namespace tflite_micro
|
@@ -18,7 +18,7 @@ limitations under the License.
|
|
18
18
|
|
19
19
|
#include "mli_api.h" // NOLINT
|
20
20
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
21
|
-
namespace
|
21
|
+
namespace tflite_micro {
|
22
22
|
namespace ops {
|
23
23
|
namespace micro {
|
24
24
|
|
@@ -70,6 +70,6 @@ class MliTensorInterface {
|
|
70
70
|
|
71
71
|
} // namespace micro
|
72
72
|
} // namespace ops
|
73
|
-
} // namespace
|
73
|
+
} // namespace tflite_micro
|
74
74
|
|
75
75
|
#endif // TENSORFLOW_LITE_MICRO_KERNELS_ARC_MLI_SLICERS_H_
|
@@ -17,7 +17,7 @@ limitations under the License.
|
|
17
17
|
#define TENSORFLOW_LITE_MICRO_KERNELS_ARC_MLI_SLICERS_H_
|
18
18
|
|
19
19
|
#include "mli_api.h" // NOLINT
|
20
|
-
namespace
|
20
|
+
namespace tflite_micro {
|
21
21
|
namespace ops {
|
22
22
|
namespace micro {
|
23
23
|
|
@@ -52,5 +52,5 @@ class TensorSlicer {
|
|
52
52
|
|
53
53
|
} // namespace micro
|
54
54
|
} // namespace ops
|
55
|
-
} // namespace
|
55
|
+
} // namespace tflite_micro
|
56
56
|
#endif // TENSORFLOW_LITE_MICRO_KERNELS_ARC_MLI_SLICERS_H_
|