xmos-ai-tools 1.3.2.dev19__py3-none-macosx_11_0_arm64.whl → 1.3.2.dev37__py3-none-macosx_11_0_arm64.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/runtime/include/lib_tflite_micro/api/inference_engine.h +9 -9
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_common.h +2 -2
- 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 +3 -3
- 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 +2 -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/libhost_xtflitemicro.a +0 -0
- xmos_ai_tools/runtime/lib/libxtflitemicro.a +0 -0
- xmos_ai_tools/xinterpreters/libs/macos/xtflm_python.1.0.1.dylib +0 -0
- xmos_ai_tools/xinterpreters/libs/macos/xtflm_python.dylib +0 -0
- {xmos_ai_tools-1.3.2.dev19.data → xmos_ai_tools-1.3.2.dev37.data}/data/bin/xcore-opt +0 -0
- {xmos_ai_tools-1.3.2.dev19.dist-info → xmos_ai_tools-1.3.2.dev37.dist-info}/METADATA +2 -2
- {xmos_ai_tools-1.3.2.dev19.dist-info → xmos_ai_tools-1.3.2.dev37.dist-info}/RECORD +206 -206
- {xmos_ai_tools-1.3.2.dev19.dist-info → xmos_ai_tools-1.3.2.dev37.dist-info}/WHEEL +0 -0
- {xmos_ai_tools-1.3.2.dev19.dist-info → xmos_ai_tools-1.3.2.dev37.dist-info}/top_level.txt +0 -0
@@ -38,15 +38,15 @@
|
|
38
38
|
* must therefore be allocated inside a C++ source file.
|
39
39
|
*/
|
40
40
|
struct tflite_micro_objects {
|
41
|
-
|
42
|
-
|
41
|
+
tflite_micro::micro::xcore::XCoreErrorReporter error_reporter;
|
42
|
+
tflite_micro::micro::xcore::XCoreProfiler xcore_profiler;
|
43
43
|
uint64_t interpreter_buffer
|
44
|
-
[(sizeof(
|
44
|
+
[(sizeof(tflite_micro::micro::xcore::XCoreInterpreter) + sizeof(uint64_t) - 1) /
|
45
45
|
sizeof(uint64_t)]; // This needs to be aligned on a double word boundary
|
46
|
-
|
46
|
+
tflite_micro::MicroMutableOpResolver<XTFLM_OPERATORS> resolver;
|
47
47
|
|
48
|
-
|
49
|
-
const
|
48
|
+
tflite_micro::micro::xcore::XCoreInterpreter *interpreter;
|
49
|
+
const tflite_micro::Model *model;
|
50
50
|
};
|
51
51
|
#endif
|
52
52
|
|
@@ -122,8 +122,8 @@ typedef struct inference_engine {
|
|
122
122
|
* &s0);
|
123
123
|
* resolver->AddAdd();
|
124
124
|
* resolver->AddConv2D();
|
125
|
-
* resolver->AddCustom(
|
126
|
-
*
|
125
|
+
* resolver->AddCustom(tflite_micro::ops::micro::xcore::Conv2D_V2_OpCode,
|
126
|
+
* tflite_micro::ops::micro::xcore::Register_Conv2D_V2());
|
127
127
|
* [...]
|
128
128
|
*
|
129
129
|
* Note that when tensorflow lite for micro is disabled this function will not
|
@@ -146,7 +146,7 @@ typedef struct inference_engine {
|
|
146
146
|
* structures. Must be allocated by the caller.
|
147
147
|
*
|
148
148
|
*/
|
149
|
-
|
149
|
+
tflite_micro::MicroMutableOpResolver<XTFLM_OPERATORS> *inference_engine_initialize(
|
150
150
|
inference_engine_t *UNSAFE ie, uint32_t memory_primary[],
|
151
151
|
uint32_t n_memory_primary, uint32_t memory_secondary[],
|
152
152
|
uint32_t n_secondary, struct tflite_micro_objects *UNSAFE xtflmo);
|
@@ -4,7 +4,7 @@
|
|
4
4
|
#include <cassert>
|
5
5
|
#include <cstdint>
|
6
6
|
|
7
|
-
namespace
|
7
|
+
namespace tflite_micro {
|
8
8
|
namespace ops {
|
9
9
|
namespace micro {
|
10
10
|
namespace xcore {
|
@@ -14,6 +14,6 @@ void calculateThreadSplit(int &tc, int split_size, int split_start[], int split_
|
|
14
14
|
} // namespace xcore
|
15
15
|
} // namespace micro
|
16
16
|
} // namespace ops
|
17
|
-
} // namespace
|
17
|
+
} // namespace tflite_micro
|
18
18
|
|
19
19
|
#endif // XCORE_COMMON_H_
|
xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_custom_options.h
CHANGED
@@ -4,7 +4,7 @@
|
|
4
4
|
#include "flatbuffers/flexbuffers.h"
|
5
5
|
#include "xcore_ops.h"
|
6
6
|
|
7
|
-
namespace
|
7
|
+
namespace tflite_micro {
|
8
8
|
namespace ops {
|
9
9
|
namespace micro {
|
10
10
|
namespace xcore {
|
@@ -23,6 +23,6 @@ public:
|
|
23
23
|
} // namespace xcore
|
24
24
|
} // namespace micro
|
25
25
|
} // namespace ops
|
26
|
-
} // namespace
|
26
|
+
} // namespace tflite_micro
|
27
27
|
|
28
28
|
#endif // XCORE_CUSTOM_OPTIONS_H_
|
xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_error_reporter.h
CHANGED
@@ -6,11 +6,11 @@
|
|
6
6
|
#include "tensorflow/lite/micro/compatibility.h"
|
7
7
|
#include "tensorflow/lite/micro/tflite_bridge/micro_error_reporter.h"
|
8
8
|
|
9
|
-
namespace
|
9
|
+
namespace tflite_micro {
|
10
10
|
namespace micro {
|
11
11
|
namespace xcore {
|
12
12
|
|
13
|
-
class XCoreErrorReporter : public
|
13
|
+
class XCoreErrorReporter : public tflite_micro::MicroErrorReporter {
|
14
14
|
public:
|
15
15
|
explicit XCoreErrorReporter(){};
|
16
16
|
~XCoreErrorReporter() override = default;
|
@@ -27,6 +27,6 @@ private:
|
|
27
27
|
|
28
28
|
} // namespace xcore
|
29
29
|
} // namespace micro
|
30
|
-
} // namespace
|
30
|
+
} // namespace tflite_micro
|
31
31
|
|
32
32
|
#endif // XCORE_ERROR_REPORTER_H_
|
@@ -8,21 +8,21 @@
|
|
8
8
|
#include "tensorflow/lite/micro/micro_interpreter.h"
|
9
9
|
#include "xcore_profiler.h"
|
10
10
|
|
11
|
-
namespace
|
11
|
+
namespace tflite_micro {
|
12
12
|
namespace micro {
|
13
13
|
namespace xcore {
|
14
14
|
|
15
|
-
class XCoreInterpreter : public
|
15
|
+
class XCoreInterpreter : public tflite_micro::MicroInterpreter {
|
16
16
|
public:
|
17
|
-
XCoreInterpreter(const
|
18
|
-
const
|
19
|
-
|
17
|
+
XCoreInterpreter(const tflite_micro::Model *model,
|
18
|
+
const tflite_micro::MicroOpResolver &resolver,
|
19
|
+
tflite_micro::MicroAllocator *allocator,
|
20
20
|
bool use_curent_thread = true,
|
21
21
|
XCoreProfiler *profiler = nullptr);
|
22
22
|
|
23
23
|
static XCoreInterpreter *
|
24
|
-
Create(uint8_t interpreter_buffer[], const
|
25
|
-
const
|
24
|
+
Create(uint8_t interpreter_buffer[], const tflite_micro::Model *model,
|
25
|
+
const tflite_micro::MicroOpResolver &resolver, uint8_t *arena,
|
26
26
|
size_t arena_size, bool use_current_thread, XCoreProfiler *profiler);
|
27
27
|
|
28
28
|
void PrintMemoryPlan();
|
@@ -44,6 +44,6 @@ public:
|
|
44
44
|
|
45
45
|
} // namespace xcore
|
46
46
|
} // namespace micro
|
47
|
-
} // namespace
|
47
|
+
} // namespace tflite_micro
|
48
48
|
|
49
49
|
#endif // XCORE_INTERPRETER_H_
|
@@ -3,7 +3,7 @@
|
|
3
3
|
|
4
4
|
#include "tensorflow/lite/micro/micro_mutable_op_resolver.h"
|
5
5
|
|
6
|
-
namespace
|
6
|
+
namespace tflite_micro {
|
7
7
|
namespace ops {
|
8
8
|
namespace micro {
|
9
9
|
namespace xcore {
|
@@ -61,11 +61,11 @@ TFLMRegistration *Register_XC_mean();
|
|
61
61
|
// Binarized ops
|
62
62
|
TFLMRegistration *Register_XC_bsign_8();
|
63
63
|
|
64
|
-
void RegisterXCOps(
|
64
|
+
void RegisterXCOps(tflite_micro::MicroOpResolver *res);
|
65
65
|
|
66
66
|
} // namespace xcore
|
67
67
|
} // namespace micro
|
68
68
|
} // namespace ops
|
69
|
-
} // namespace
|
69
|
+
} // namespace tflite_micro
|
70
70
|
|
71
71
|
#endif // XCORE_OPS_H_
|
@@ -11,16 +11,16 @@
|
|
11
11
|
#define XCORE_PROFILER_DEFAULT_MAX_LEVELS (64)
|
12
12
|
#endif
|
13
13
|
|
14
|
-
namespace
|
14
|
+
namespace tflite_micro {
|
15
15
|
namespace micro {
|
16
16
|
namespace xcore {
|
17
17
|
|
18
|
-
class XCoreProfiler : public
|
18
|
+
class XCoreProfiler : public tflite_micro::MicroProfiler {
|
19
19
|
public:
|
20
20
|
explicit XCoreProfiler(){};
|
21
21
|
~XCoreProfiler() override = default;
|
22
22
|
|
23
|
-
void Init(
|
23
|
+
void Init(tflite_micro::MicroAllocator *allocator,
|
24
24
|
size_t max_event_count = XCORE_PROFILER_DEFAULT_MAX_LEVELS);
|
25
25
|
|
26
26
|
void ClearEvents();
|
@@ -44,6 +44,6 @@ private:
|
|
44
44
|
|
45
45
|
} // namespace xcore
|
46
46
|
} // namespace micro
|
47
|
-
} // namespace
|
47
|
+
} // namespace tflite_micro
|
48
48
|
|
49
49
|
#endif // XCORE_PROFILER_H_
|
@@ -9,7 +9,7 @@
|
|
9
9
|
#include "tensorflow/lite/micro/kernels/kernel_util.h"
|
10
10
|
#include "tensorflow/lite/micro/memory_helpers.h"
|
11
11
|
|
12
|
-
namespace
|
12
|
+
namespace tflite_micro {
|
13
13
|
namespace ops {
|
14
14
|
namespace micro {
|
15
15
|
|
@@ -79,14 +79,14 @@ fetch_scratch_if_needed(TfLiteContext *context, T *&array,
|
|
79
79
|
if (scratch_idx >= 0) {
|
80
80
|
array =
|
81
81
|
static_cast<const T *>(context->GetScratchBuffer(context, scratch_idx));
|
82
|
-
const RuntimeShape shape =
|
82
|
+
const RuntimeShape shape = tflite_micro::micro::GetTensorShape(tensor);
|
83
83
|
|
84
84
|
size_t sizeof_tensor_type;
|
85
85
|
TfLiteTypeSizeOf(tensor->type, &sizeof_tensor_type);
|
86
|
-
FetchBuffer((int8_t **)&array,
|
86
|
+
FetchBuffer((int8_t **)&array, tflite_micro::micro::GetTensorData<int8_t>(tensor),
|
87
87
|
shape.FlatSize() * sizeof_tensor_type);
|
88
88
|
} else {
|
89
|
-
array =
|
89
|
+
array = tflite_micro::micro::GetTensorData<T>(tensor);
|
90
90
|
}
|
91
91
|
TF_LITE_ENSURE(context, array);
|
92
92
|
return kTfLiteOk;
|
@@ -155,6 +155,6 @@ public:
|
|
155
155
|
} // namespace xcore
|
156
156
|
} // namespace micro
|
157
157
|
} // namespace ops
|
158
|
-
} // namespace
|
158
|
+
} // namespace tflite_micro
|
159
159
|
|
160
160
|
#endif // XCORE_UTILS_H_
|
@@ -354,7 +354,7 @@ void XUD_Kill(XUD_ep ep);
|
|
354
354
|
* The buffer is assumed to be word aligned.
|
355
355
|
* \return XUD_RES_OKAY on success, for errors see `Status Reporting`.
|
356
356
|
*/
|
357
|
-
inline int XUD_SetReady_OutPtr(XUD_ep ep, unsigned addr)
|
357
|
+
static inline int XUD_SetReady_OutPtr(XUD_ep ep, unsigned addr)
|
358
358
|
{
|
359
359
|
int chan_array_ptr;
|
360
360
|
int reset;
|
@@ -390,7 +390,7 @@ int XUD_SetReady_Out(XUD_ep ep, unsigned char buffer[]);
|
|
390
390
|
* \param len The length of the data to transmit.
|
391
391
|
* \return XUD_RES_OKAY on success, for errors see `Status Reporting`.
|
392
392
|
*/
|
393
|
-
inline XUD_Result_t XUD_SetReady_InPtr(XUD_ep ep, unsigned addr, int len)
|
393
|
+
static inline XUD_Result_t XUD_SetReady_InPtr(XUD_ep ep, unsigned addr, int len)
|
394
394
|
{
|
395
395
|
int chan_array_ptr;
|
396
396
|
int tmp, tmp2;
|
@@ -453,7 +453,7 @@ inline XUD_Result_t XUD_SetReady_InPtr(XUD_ep ep, unsigned addr, int len)
|
|
453
453
|
* \param len The length of the data to transmit.
|
454
454
|
* \return XUD_RES_OKAY on success, for errors see `Status Reporting`.
|
455
455
|
*/
|
456
|
-
inline XUD_Result_t XUD_SetReady_In(XUD_ep ep, unsigned char buffer[], int len)
|
456
|
+
static inline XUD_Result_t XUD_SetReady_In(XUD_ep ep, unsigned char buffer[], int len)
|
457
457
|
{
|
458
458
|
unsigned addr;
|
459
459
|
|
@@ -23,7 +23,7 @@ limitations under the License.
|
|
23
23
|
|
24
24
|
#include "tensorflow/lite/core/c/common.h"
|
25
25
|
|
26
|
-
namespace
|
26
|
+
namespace tflite_micro {
|
27
27
|
|
28
28
|
/// TfLite*Array helpers
|
29
29
|
|
@@ -73,13 +73,13 @@ TfLiteArrayUniquePtr<T> BuildTfLiteArray(int size);
|
|
73
73
|
// Allocates a TfLiteIntArray of given size using malloc.
|
74
74
|
template <>
|
75
75
|
inline IntArrayUniquePtr BuildTfLiteArray<int>(const int size) {
|
76
|
-
return IntArrayUniquePtr(
|
76
|
+
return IntArrayUniquePtr(TfLiteMicroIntArrayCreate(size));
|
77
77
|
}
|
78
78
|
|
79
79
|
// Allocates a TfLiteFloatArray of given size using malloc.
|
80
80
|
template <>
|
81
81
|
inline FloatArrayUniquePtr BuildTfLiteArray<float>(const int size) {
|
82
|
-
return FloatArrayUniquePtr(
|
82
|
+
return FloatArrayUniquePtr(TfLiteMicroFloatArrayCreate(size));
|
83
83
|
}
|
84
84
|
|
85
85
|
// Allocates a TFLiteArray of given size and initializes it with the given
|
@@ -151,6 +151,6 @@ inline FloatArrayUniquePtr BuildTfLiteArray(const TfLiteFloatArray& other) {
|
|
151
151
|
return BuildTfLiteArray(other.size, other.data);
|
152
152
|
}
|
153
153
|
|
154
|
-
} // namespace
|
154
|
+
} // namespace tflite_micro
|
155
155
|
|
156
156
|
#endif // TENSORFLOW_LITE_ARRAY_H_
|
@@ -23,7 +23,7 @@ limitations under the License.
|
|
23
23
|
|
24
24
|
#include "tensorflow/lite/core/c/common.h"
|
25
25
|
|
26
|
-
namespace
|
26
|
+
namespace tflite_micro {
|
27
27
|
|
28
28
|
/// Provides a range iterable wrapper for TfLiteIntArray* (C lists) that TfLite
|
29
29
|
/// C api uses.
|
@@ -49,6 +49,6 @@ class TfLiteIntArrayView {
|
|
49
49
|
const TfLiteIntArray* int_array_;
|
50
50
|
};
|
51
51
|
|
52
|
-
} // namespace
|
52
|
+
} // namespace tflite_micro
|
53
53
|
|
54
54
|
#endif // TENSORFLOW_LITE_CONTEXT_UTIL_H_
|
@@ -17,7 +17,7 @@ limitations under the License.
|
|
17
17
|
|
18
18
|
#include <cstdarg>
|
19
19
|
|
20
|
-
namespace
|
20
|
+
namespace tflite_micro {
|
21
21
|
|
22
22
|
/// A functor that reports error to supporting system. Invoked similar to
|
23
23
|
/// printf.
|
@@ -53,7 +53,7 @@ class ErrorReporter {
|
|
53
53
|
int ReportError(void*, const char* format, ...);
|
54
54
|
};
|
55
55
|
|
56
|
-
} // namespace
|
56
|
+
} // namespace tflite_micro
|
57
57
|
|
58
58
|
// You should not make bare calls to the error reporter, instead use the
|
59
59
|
// TF_LITE_REPORT_ERROR macro, since this allows message strings to be
|
@@ -63,7 +63,7 @@ class ErrorReporter {
|
|
63
63
|
#ifndef TF_LITE_STRIP_ERROR_STRINGS
|
64
64
|
#define TF_LITE_REPORT_ERROR(reporter, ...) \
|
65
65
|
do { \
|
66
|
-
static_cast<::
|
66
|
+
static_cast<::tflite_micro::ErrorReporter*>(reporter)->Report(__VA_ARGS__); \
|
67
67
|
} while (false)
|
68
68
|
#else // TF_LITE_STRIP_ERROR_STRINGS
|
69
69
|
#define TF_LITE_REPORT_ERROR(reporter, ...)
|
@@ -27,7 +27,7 @@ limitations under the License.
|
|
27
27
|
#include "tensorflow/lite/core/c/common.h"
|
28
28
|
#include "tensorflow/lite/schema/schema_generated.h"
|
29
29
|
|
30
|
-
namespace
|
30
|
+
namespace tflite_micro {
|
31
31
|
|
32
32
|
// Interface class for builtin data allocations.
|
33
33
|
class BuiltinDataAllocator {
|
@@ -435,6 +435,6 @@ TfLiteStatus ParseStablehloGather(const Operator* op,
|
|
435
435
|
BuiltinDataAllocator* allocator,
|
436
436
|
void** builtin_data);
|
437
437
|
|
438
|
-
} // namespace
|
438
|
+
} // namespace tflite_micro
|
439
439
|
|
440
440
|
#endif // TENSORFLOW_LITE_CORE_API_FLATBUFFER_CONVERSIONS_H_
|
@@ -18,11 +18,11 @@ limitations under the License.
|
|
18
18
|
|
19
19
|
#include "tensorflow/lite/core/c/common.h"
|
20
20
|
|
21
|
-
namespace
|
21
|
+
namespace tflite_micro {
|
22
22
|
|
23
23
|
// Resets a variable tensor to the default value.
|
24
24
|
TfLiteStatus ResetVariableTensor(TfLiteTensor* tensor);
|
25
25
|
|
26
|
-
} // namespace
|
26
|
+
} // namespace tflite_micro
|
27
27
|
|
28
28
|
#endif // TENSORFLOW_LITE_CORE_API_TENSOR_UTILS_H_
|
@@ -76,15 +76,15 @@ typedef enum TfLiteStatus {
|
|
76
76
|
kTfLiteApplicationError = 3,
|
77
77
|
|
78
78
|
/// Generally referring to serialized delegate data not being found.
|
79
|
-
/// See
|
79
|
+
/// See tflite_micro::delegates::Serialization.
|
80
80
|
kTfLiteDelegateDataNotFound = 4,
|
81
81
|
|
82
82
|
/// Generally referring to data-writing issues in delegate serialization.
|
83
|
-
/// See
|
83
|
+
/// See tflite_micro::delegates::Serialization.
|
84
84
|
kTfLiteDelegateDataWriteError = 5,
|
85
85
|
|
86
86
|
/// Generally referring to data-reading issues in delegate serialization.
|
87
|
-
/// See
|
87
|
+
/// See tflite_micro::delegates::Serialization.
|
88
88
|
kTfLiteDelegateDataReadError = 6,
|
89
89
|
|
90
90
|
/// Generally referring to issues when the TF Lite model has ops that cannot
|
@@ -107,28 +107,28 @@ typedef struct TfLiteIntArray {
|
|
107
107
|
|
108
108
|
// Given the size (number of elements) in a TfLiteIntArray, calculate its size
|
109
109
|
// in bytes.
|
110
|
-
size_t
|
110
|
+
size_t TfLiteMicroIntArrayGetSizeInBytes(int size);
|
111
111
|
|
112
112
|
#ifndef TF_LITE_STATIC_MEMORY
|
113
113
|
// Create a array of a given `size` (uninitialized entries).
|
114
114
|
// This returns a pointer, that you must free using TfLiteIntArrayFree().
|
115
|
-
TfLiteIntArray*
|
115
|
+
TfLiteIntArray* TfLiteMicroIntArrayCreate(int size);
|
116
116
|
#endif
|
117
117
|
|
118
118
|
// Check if two intarrays are equal. Returns 1 if they are equal, 0 otherwise.
|
119
|
-
int
|
119
|
+
int TfLiteMicroIntArrayEqual(const TfLiteIntArray* a, const TfLiteIntArray* b);
|
120
120
|
|
121
121
|
// Check if an intarray equals an array. Returns 1 if equals, 0 otherwise.
|
122
|
-
int
|
122
|
+
int TfLiteMicroIntArrayEqualsArray(const TfLiteIntArray* a, int b_size,
|
123
123
|
const int b_data[]);
|
124
124
|
|
125
125
|
#ifndef TF_LITE_STATIC_MEMORY
|
126
126
|
// Create a copy of an array passed as `src`.
|
127
127
|
// You are expected to free memory with TfLiteIntArrayFree
|
128
|
-
TfLiteIntArray*
|
128
|
+
TfLiteIntArray* TfLiteMicroIntArrayCopy(const TfLiteIntArray* src);
|
129
129
|
|
130
130
|
// Free memory of array `a`.
|
131
|
-
void
|
131
|
+
void TfLiteMicroIntArrayFree(TfLiteIntArray* a);
|
132
132
|
#endif // TF_LITE_STATIC_MEMORY
|
133
133
|
|
134
134
|
// Fixed size list of floats. Used for per-channel quantization.
|
@@ -156,14 +156,14 @@ int TfLiteFloatArrayGetSizeInBytes(int size);
|
|
156
156
|
#ifndef TF_LITE_STATIC_MEMORY
|
157
157
|
// Create a array of a given `size` (uninitialized entries).
|
158
158
|
// This returns a pointer, that you must free using TfLiteFloatArrayFree().
|
159
|
-
TfLiteFloatArray*
|
159
|
+
TfLiteFloatArray* TfLiteMicroFloatArrayCreate(int size);
|
160
160
|
|
161
161
|
// Create a copy of an array passed as `src`.
|
162
162
|
// You are expected to free memory with TfLiteFloatArrayFree.
|
163
|
-
TfLiteFloatArray*
|
163
|
+
TfLiteFloatArray* TfLiteMicroFloatArrayCopy(const TfLiteFloatArray* src);
|
164
164
|
|
165
165
|
// Free memory of array `a`.
|
166
|
-
void
|
166
|
+
void TfLiteMicroFloatArrayFree(TfLiteFloatArray* a);
|
167
167
|
#endif // TF_LITE_STATIC_MEMORY
|
168
168
|
|
169
169
|
// Since we must not depend on any libraries, define a minimal subset of
|
@@ -238,8 +238,8 @@ void TfLiteFloatArrayFree(TfLiteFloatArray* a);
|
|
238
238
|
do { \
|
239
239
|
if ((a) != (b)) { \
|
240
240
|
TF_LITE_KERNEL_LOG((context), "%s:%d %s != %s (%s != %s)", __FILE__, \
|
241
|
-
__LINE__, #a, #b,
|
242
|
-
|
241
|
+
__LINE__, #a, #b, TfLiteMicroTypeGetName(a), \
|
242
|
+
TfLiteMicroTypeGetName(b)); \
|
243
243
|
return kTfLiteError; \
|
244
244
|
} \
|
245
245
|
} while (0)
|
@@ -279,7 +279,7 @@ typedef struct TfLiteFloat16 {
|
|
279
279
|
} TfLiteFloat16;
|
280
280
|
|
281
281
|
// Return the name of a given type, for error reporting purposes.
|
282
|
-
const char*
|
282
|
+
const char* TfLiteMicroTypeGetName(TfLiteType type);
|
283
283
|
|
284
284
|
// SupportedQuantizationTypes.
|
285
285
|
typedef enum TfLiteQuantizationType {
|
@@ -472,7 +472,7 @@ typedef struct TfLiteTensor {
|
|
472
472
|
// bytes = sizeof(float) * 3 * 2 = 4 * 3 * 2 = 24.
|
473
473
|
size_t bytes;
|
474
474
|
|
475
|
-
// An opaque pointer to a
|
475
|
+
// An opaque pointer to a tflite_micro::MMapAllocation
|
476
476
|
const void* allocation;
|
477
477
|
|
478
478
|
// Null-terminated name of this tensor.
|
@@ -657,10 +657,10 @@ typedef struct TfLiteEvalTensor {
|
|
657
657
|
void TfLiteTensorDataFree(TfLiteTensor* t);
|
658
658
|
|
659
659
|
// Free quantization data.
|
660
|
-
void
|
660
|
+
void TfLiteMicroQuantizationFree(TfLiteQuantization* quantization);
|
661
661
|
|
662
662
|
// Free sparsity parameters.
|
663
|
-
void
|
663
|
+
void TfLiteMicroSparsityFree(TfLiteSparsity* sparsity);
|
664
664
|
|
665
665
|
// Free memory of tensor `t`.
|
666
666
|
void TfLiteTensorFree(TfLiteTensor* t);
|
@@ -1311,8 +1311,8 @@ typedef struct TfLiteOpaqueDelegateBuilder {
|
|
1311
1311
|
// the objects pointed to by any of the fields within the
|
1312
1312
|
// 'opaque_delegate_builder' must outlive the returned
|
1313
1313
|
// 'TfLiteOpaqueDelegate' and any 'TfLiteInterpreter',
|
1314
|
-
// 'TfLiteInterpreterOptions', '
|
1315
|
-
// '
|
1314
|
+
// 'TfLiteInterpreterOptions', 'tflite_micro::Interpreter', or
|
1315
|
+
// 'tflite_micro::InterpreterBuilder' that the delegate is added to. The returned
|
1316
1316
|
// address should be passed to 'TfLiteOpaqueDelegateDelete' for deletion. If
|
1317
1317
|
// 'opaque_delegate_builder' is a null pointer, then a null pointer will be
|
1318
1318
|
// returned.
|
@@ -35,7 +35,7 @@ limitations under the License.
|
|
35
35
|
#include "tensorflow/lite/kernels/internal/optimized/neon_check.h"
|
36
36
|
#include "tensorflow/lite/kernels/internal/types.h"
|
37
37
|
|
38
|
-
namespace
|
38
|
+
namespace tflite_micro {
|
39
39
|
|
40
40
|
constexpr int kReverseShift = -1;
|
41
41
|
|
@@ -1353,6 +1353,6 @@ void optimized_ops_prefetch_write_l1_keep(const T* ptr) {
|
|
1353
1353
|
#endif
|
1354
1354
|
}
|
1355
1355
|
|
1356
|
-
} // namespace
|
1356
|
+
} // namespace tflite_micro
|
1357
1357
|
|
1358
1358
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_COMMON_H_
|
@@ -17,7 +17,7 @@ limitations under the License.
|
|
17
17
|
|
18
18
|
#include <cmath>
|
19
19
|
|
20
|
-
namespace
|
20
|
+
namespace tflite_micro {
|
21
21
|
|
22
22
|
#if defined(TF_LITE_USE_GLOBAL_CMATH_FUNCTIONS) || \
|
23
23
|
(defined(__ANDROID__) && !defined(__NDK_MAJOR__)) || defined(__ZEPHYR__)
|
@@ -35,6 +35,6 @@ namespace tflite {
|
|
35
35
|
DECLARE_STD_GLOBAL_SWITCH1(TfLiteRound, round)
|
36
36
|
DECLARE_STD_GLOBAL_SWITCH1(TfLiteExpm1, expm1)
|
37
37
|
|
38
|
-
} // namespace
|
38
|
+
} // namespace tflite_micro
|
39
39
|
|
40
40
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_CPPMATH_H_
|
@@ -17,7 +17,7 @@ limitations under the License.
|
|
17
17
|
|
18
18
|
#include <cmath>
|
19
19
|
|
20
|
-
namespace
|
20
|
+
namespace tflite_micro {
|
21
21
|
|
22
22
|
#if defined(TF_LITE_USE_GLOBAL_MAX) || defined(__ZEPHYR__)
|
23
23
|
inline float TfLiteMax(const float& x, const float& y) {
|
@@ -30,6 +30,6 @@ inline T TfLiteMax(const T& x, const T& y) {
|
|
30
30
|
}
|
31
31
|
#endif
|
32
32
|
|
33
|
-
} // namespace
|
33
|
+
} // namespace tflite_micro
|
34
34
|
|
35
35
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_MAX_H_
|
@@ -17,7 +17,7 @@ limitations under the License.
|
|
17
17
|
|
18
18
|
#include <cmath>
|
19
19
|
|
20
|
-
namespace
|
20
|
+
namespace tflite_micro {
|
21
21
|
|
22
22
|
#if defined(TF_LITE_USE_GLOBAL_MIN) || defined(__ZEPHYR__)
|
23
23
|
inline float TfLiteMin(const float& x, const float& y) {
|
@@ -30,6 +30,6 @@ inline T TfLiteMin(const T& x, const T& y) {
|
|
30
30
|
}
|
31
31
|
#endif
|
32
32
|
|
33
|
-
} // namespace
|
33
|
+
} // namespace tflite_micro
|
34
34
|
|
35
35
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_MIN_H_
|
@@ -22,7 +22,7 @@ limitations under the License.
|
|
22
22
|
#include "tensorflow/lite/kernels/internal/tensor_ctypes.h"
|
23
23
|
#include "tensorflow/lite/kernels/internal/types.h"
|
24
24
|
|
25
|
-
namespace
|
25
|
+
namespace tflite_micro {
|
26
26
|
|
27
27
|
// A list of tensors in a format that can be used by kernels like split and
|
28
28
|
// concatenation.
|
@@ -136,6 +136,6 @@ class SequentialTensorWriter {
|
|
136
136
|
T* output_ptr_;
|
137
137
|
};
|
138
138
|
|
139
|
-
} // namespace
|
139
|
+
} // namespace tflite_micro
|
140
140
|
|
141
141
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_PORTABLE_TENSOR_H_
|
@@ -27,7 +27,7 @@ limitations under the License.
|
|
27
27
|
#define __restrict__ __restrict
|
28
28
|
#endif
|
29
29
|
|
30
|
-
namespace
|
30
|
+
namespace tflite_micro {
|
31
31
|
|
32
32
|
// Not all backends support CpuBackendContext usage, so forward declare to avoid
|
33
33
|
// pulling in its implementation. Use of CpuBackendContext in method
|
@@ -618,6 +618,6 @@ void UnpackDenseInt4IntoInt8(const int8_t* src_buffer, int num_elements,
|
|
618
618
|
|
619
619
|
} // namespace tensor_utils
|
620
620
|
|
621
|
-
} // namespace
|
621
|
+
} // namespace tflite_micro
|
622
622
|
|
623
623
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_PORTABLE_TENSOR_UTILS_H_
|
@@ -23,7 +23,7 @@ limitations under the License.
|
|
23
23
|
#include "tensorflow/lite/kernels/internal/cppmath.h"
|
24
24
|
#include "tensorflow/lite/kernels/internal/types.h"
|
25
25
|
|
26
|
-
namespace
|
26
|
+
namespace tflite_micro {
|
27
27
|
|
28
28
|
// Given the min and max values of a float array, return
|
29
29
|
// reasonable quantization parameters to use for this array.
|
@@ -287,6 +287,6 @@ void QuantizeMultiplierArray(const double* effective_scales, size_t size,
|
|
287
287
|
int32_t* effective_scale_significand,
|
288
288
|
int* effective_shift);
|
289
289
|
|
290
|
-
} // namespace
|
290
|
+
} // namespace tflite_micro
|
291
291
|
|
292
292
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_QUANTIZATION_UTIL_H_
|
@@ -24,7 +24,7 @@ limitations under the License.
|
|
24
24
|
#include "tensorflow/lite/kernels/internal/common.h"
|
25
25
|
#include "tensorflow/lite/kernels/internal/compatibility.h"
|
26
26
|
|
27
|
-
namespace
|
27
|
+
namespace tflite_micro {
|
28
28
|
|
29
29
|
namespace reference_ops {
|
30
30
|
|
@@ -479,7 +479,7 @@ inline void BroadcastAddFivefold(const ArithmeticParams& unswitched_params,
|
|
479
479
|
|
480
480
|
const bool use_unswitched =
|
481
481
|
unswitched_params.broadcast_category ==
|
482
|
-
|
482
|
+
tflite_micro::BroadcastableOpCategory::kFirstInputBroadcastsFast;
|
483
483
|
|
484
484
|
const ArithmeticParams& params =
|
485
485
|
use_unswitched ? unswitched_params : switched_params;
|
@@ -556,6 +556,6 @@ inline void BroadcastAddFivefold(const ArithmeticParams& unswitched_params,
|
|
556
556
|
}
|
557
557
|
|
558
558
|
} // namespace reference_ops
|
559
|
-
} // namespace
|
559
|
+
} // namespace tflite_micro
|
560
560
|
|
561
561
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_ADD_H_
|
@@ -20,7 +20,7 @@ limitations under the License.
|
|
20
20
|
|
21
21
|
#include "tensorflow/lite/kernels/internal/common.h"
|
22
22
|
|
23
|
-
namespace
|
23
|
+
namespace tflite_micro {
|
24
24
|
namespace reference_ops {
|
25
25
|
|
26
26
|
// T is expected to be either float or int.
|
@@ -81,6 +81,6 @@ inline void AddN(const ArithmeticParams& params,
|
|
81
81
|
}
|
82
82
|
|
83
83
|
} // namespace reference_ops
|
84
|
-
} // namespace
|
84
|
+
} // namespace tflite_micro
|
85
85
|
|
86
86
|
#endif // TENSORFLOW_LITE_KERNELS_INTERNAL_REFERENCE_ADD_N_H_
|