xmos-ai-tools 1.3.2.dev80__py3-none-macosx_10_15_universal2.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 -0
- xmos_ai_tools/io_server/__init__.py +151 -0
- xmos_ai_tools/runtime/__init__.py +0 -0
- xmos_ai_tools/runtime/buildfiles/aitoolslib.cmake +13 -0
- xmos_ai_tools/runtime/buildfiles/aitoolslib.make +8 -0
- xmos_ai_tools/runtime/include/flash_server.h +74 -0
- xmos_ai_tools/runtime/include/flatbuffers/allocator.h +68 -0
- xmos_ai_tools/runtime/include/flatbuffers/array.h +243 -0
- xmos_ai_tools/runtime/include/flatbuffers/base.h +474 -0
- xmos_ai_tools/runtime/include/flatbuffers/bfbs_generator.h +43 -0
- xmos_ai_tools/runtime/include/flatbuffers/buffer.h +142 -0
- xmos_ai_tools/runtime/include/flatbuffers/buffer_ref.h +53 -0
- xmos_ai_tools/runtime/include/flatbuffers/code_generators.h +235 -0
- xmos_ai_tools/runtime/include/flatbuffers/default_allocator.h +64 -0
- xmos_ai_tools/runtime/include/flatbuffers/detached_buffer.h +114 -0
- xmos_ai_tools/runtime/include/flatbuffers/flatbuffer_builder.h +1197 -0
- xmos_ai_tools/runtime/include/flatbuffers/flatbuffers.h +270 -0
- xmos_ai_tools/runtime/include/flatbuffers/flatc.h +111 -0
- xmos_ai_tools/runtime/include/flatbuffers/flexbuffers.h +1897 -0
- xmos_ai_tools/runtime/include/flatbuffers/grpc.h +300 -0
- xmos_ai_tools/runtime/include/flatbuffers/hash.h +127 -0
- xmos_ai_tools/runtime/include/flatbuffers/idl.h +1232 -0
- xmos_ai_tools/runtime/include/flatbuffers/minireflect.h +419 -0
- xmos_ai_tools/runtime/include/flatbuffers/pch/flatc_pch.h +39 -0
- xmos_ai_tools/runtime/include/flatbuffers/pch/pch.h +38 -0
- xmos_ai_tools/runtime/include/flatbuffers/reflection.h +502 -0
- xmos_ai_tools/runtime/include/flatbuffers/reflection_generated.h +1449 -0
- xmos_ai_tools/runtime/include/flatbuffers/registry.h +128 -0
- xmos_ai_tools/runtime/include/flatbuffers/stl_emulation.h +509 -0
- xmos_ai_tools/runtime/include/flatbuffers/string.h +64 -0
- xmos_ai_tools/runtime/include/flatbuffers/struct.h +53 -0
- xmos_ai_tools/runtime/include/flatbuffers/table.h +168 -0
- xmos_ai_tools/runtime/include/flatbuffers/util.h +690 -0
- xmos_ai_tools/runtime/include/flatbuffers/vector.h +370 -0
- xmos_ai_tools/runtime/include/flatbuffers/vector_downward.h +271 -0
- xmos_ai_tools/runtime/include/flatbuffers/verifier.h +283 -0
- xmos_ai_tools/runtime/include/ioserver.h +44 -0
- xmos_ai_tools/runtime/include/lib_nn/api/TransposeConv.h +24 -0
- xmos_ai_tools/runtime/include/lib_nn/api/add_int16.h +27 -0
- xmos_ai_tools/runtime/include/lib_nn/api/add_int16_transform.h +42 -0
- xmos_ai_tools/runtime/include/lib_nn/api/dequantize_int16.h +22 -0
- xmos_ai_tools/runtime/include/lib_nn/api/dequantize_int16_transform.h +34 -0
- xmos_ai_tools/runtime/include/lib_nn/api/expand_8_to_16.h +8 -0
- xmos_ai_tools/runtime/include/lib_nn/api/multiply_int16.h +42 -0
- xmos_ai_tools/runtime/include/lib_nn/api/multiply_int16_transform.h +71 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_api.h +15 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_bin_types.h +14 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_config.h +287 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_conv2d_structs.h +72 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_image.h +26 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_layers.h +303 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_op_helper.h +132 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_op_utils.h +150 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_operator.h +18 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_pooling.h +551 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_types.h +83 -0
- xmos_ai_tools/runtime/include/lib_nn/api/nn_window_params.h +55 -0
- xmos_ai_tools/runtime/include/lib_nn/api/output_transform_fn_int16.h +54 -0
- xmos_ai_tools/runtime/include/lib_nn/api/output_transform_fn_int16_kernel_transform.h +37 -0
- xmos_ai_tools/runtime/include/lib_nn/api/output_transform_fn_int16_mappings.h +13 -0
- xmos_ai_tools/runtime/include/lib_nn/api/quadratic_approximation.h +82 -0
- xmos_ai_tools/runtime/include/lib_nn/api/quadratic_interpolation.h +23 -0
- xmos_ai_tools/runtime/include/lib_nn/api/quantize_int16.h +22 -0
- xmos_ai_tools/runtime/include/lib_nn/api/quantize_int16_transform.h +33 -0
- xmos_ai_tools/runtime/include/lib_nn/api/version.h +13 -0
- 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_nn/api/vpu_sim.h +118 -0
- xmos_ai_tools/runtime/include/lib_nn/api/xs3_vpu.h +216 -0
- xmos_ai_tools/runtime/include/lib_nn/api/xs3a_registers.h +2869 -0
- xmos_ai_tools/runtime/include/lib_nn/src/asm/asm_constants.h +41 -0
- xmos_ai_tools/runtime/include/lib_nn/src/asm/window_op_plan.h +25 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/fast_flash.h +47 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/inference_engine.h +218 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/memory_parallel_transport.h +52 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/version.h +13 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_config.h +17 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_device_memory.h +62 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_shared_config.h +31 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/conv2d_float.h +155 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_common.h +19 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_custom_options.h +28 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_error_reporter.h +32 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_interpreter.h +49 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_ops.h +71 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_profiler.h +49 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_utils.h +160 -0
- xmos_ai_tools/runtime/include/lib_tflite_micro/src/thread_call.h +119 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/legacy/usb_defs.h +4 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/legacy/usb_device.h +4 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/legacy/usb_std_descriptors.h +4 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/legacy/usb_std_requests.h +4 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/xud.h +518 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/xud_conf_default.h +11 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/xud_device.h +87 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/xud_std_descriptors.h +191 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/api/xud_std_requests.h +120 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/src/user/XUD_USB_Defines.h +70 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/src/user/class/hid.h +23 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/src/user/class/usbaudio10.h +30 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/src/user/class/usbaudio20.h +357 -0
- xmos_ai_tools/runtime/include/lib_xud/lib_xud/src/user/class/usbaudiocommon.h +168 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/delay_flexbuffers_generated_data.h +25 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/energy_flexbuffers_generated_data.h +28 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/fft_flexbuffers_generated_data.h +37 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/filter_bank_flexbuffers_generated_data.h +25 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/filter_bank_log_flexbuffers_generated_data.h +27 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/filter_bank_spectral_subtraction_flexbuffers_generated_data.h +26 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/framer_flexbuffers_generated_data.h +25 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/irfft.h +31 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/overlap_add_flexbuffers_generated_data.h +25 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/pcan_flexbuffers_generated_data.h +7 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/rfft.h +31 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/stacker_flexbuffers_generated_data.h +25 -0
- xmos_ai_tools/runtime/include/signal/micro/kernels/window_flexbuffers_generated_data.h +25 -0
- xmos_ai_tools/runtime/include/signal/src/circular_buffer.h +118 -0
- xmos_ai_tools/runtime/include/signal/src/complex.h +29 -0
- xmos_ai_tools/runtime/include/signal/src/energy.h +38 -0
- xmos_ai_tools/runtime/include/signal/src/fft_auto_scale.h +35 -0
- xmos_ai_tools/runtime/include/signal/src/filter_bank.h +69 -0
- xmos_ai_tools/runtime/include/signal/src/filter_bank_log.h +38 -0
- xmos_ai_tools/runtime/include/signal/src/filter_bank_spectral_subtraction.h +73 -0
- xmos_ai_tools/runtime/include/signal/src/filter_bank_square_root.h +34 -0
- xmos_ai_tools/runtime/include/signal/src/irfft.h +84 -0
- xmos_ai_tools/runtime/include/signal/src/kiss_fft_wrappers/kiss_fft_common.h +49 -0
- xmos_ai_tools/runtime/include/signal/src/kiss_fft_wrappers/kiss_fft_float.h +31 -0
- xmos_ai_tools/runtime/include/signal/src/kiss_fft_wrappers/kiss_fft_int16.h +30 -0
- xmos_ai_tools/runtime/include/signal/src/kiss_fft_wrappers/kiss_fft_int32.h +31 -0
- xmos_ai_tools/runtime/include/signal/src/log.h +30 -0
- xmos_ai_tools/runtime/include/signal/src/max_abs.h +31 -0
- xmos_ai_tools/runtime/include/signal/src/msb.h +32 -0
- xmos_ai_tools/runtime/include/signal/src/overlap_add.h +46 -0
- xmos_ai_tools/runtime/include/signal/src/pcan_argc_fixed.h +41 -0
- xmos_ai_tools/runtime/include/signal/src/rfft.h +85 -0
- xmos_ai_tools/runtime/include/signal/src/square_root.h +32 -0
- xmos_ai_tools/runtime/include/signal/src/window.h +31 -0
- xmos_ai_tools/runtime/include/signal/testdata/fft_test_data.h +48 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/array.h +156 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/builtin_op_data.h +22 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/builtin_ops.h +241 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/c/builtin_op_data.h +20 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/c/c_api_types.h +26 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/c/common.h +30 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/context_util.h +54 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/core/api/error_reporter.h +72 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/core/api/flatbuffer_conversions.h +440 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/core/api/tensor_utils.h +28 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/core/c/builtin_op_data.h +626 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/core/c/c_api_types.h +178 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/core/c/common.h +1496 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/core/macros.h +78 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/bits.h +102 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/fft.h +50 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/fft_io.h +34 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/fft_util.h +34 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/filterbank.h +63 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/filterbank_io.h +35 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/filterbank_util.h +50 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/frontend.h +64 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/frontend_io.h +31 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/frontend_util.h +52 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/kiss_fft_common.h +48 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/kiss_fft_int16.h +33 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/log_lut.h +40 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/log_scale.h +39 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/log_scale_io.h +33 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/log_scale_util.h +45 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/noise_reduction.h +46 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/noise_reduction_io.h +36 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/noise_reduction_util.h +50 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/pcan_gain_control.h +47 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/pcan_gain_control_util.h +57 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/window.h +49 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/window_io.h +34 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/experimental/microfrontend/lib/window_util.h +45 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/common.h +1358 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/compatibility.h +122 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/cppmath.h +40 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/max.h +35 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/min.h +35 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/optimized/neon_check.h +20 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/portable_tensor.h +141 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/portable_tensor_utils.h +623 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/quantization_util.h +292 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/add.h +561 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/add_n.h +86 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/arg_min_max.h +88 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/batch_matmul.h +275 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/batch_to_space_nd.h +101 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/binary_function.h +91 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/broadcast_args.h +56 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/broadcast_to.h +97 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/ceil.h +37 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/comparisons.h +271 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/concatenation.h +141 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/conv.h +289 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/cumsum.h +175 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/depth_to_space.h +79 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/depthwiseconv_float.h +100 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/depthwiseconv_uint8.h +319 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/dequantize.h +78 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/div.h +247 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/elu.h +37 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/exp.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/fill.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/floor.h +39 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/floor_div.h +35 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/floor_mod.h +44 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/fully_connected.h +323 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/hard_swish.h +168 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/add.h +250 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/conv.h +241 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/depthwise_conv.h +291 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/fully_connected.h +126 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/l2normalization.h +67 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/logistic.h +121 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/mean.h +18 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/mul.h +194 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/pooling.h +264 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/tanh.h +117 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/integer_ops/transpose_conv.h +224 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/l2normalization.h +90 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/leaky_relu.h +69 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/log_softmax.h +256 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/logistic.h +132 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/lstm_cell.h +422 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/maximum_minimum.h +64 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/mul.h +267 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/neg.h +37 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/pad.h +169 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/pooling.h +303 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/portable_tensor_utils.h +333 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/portable_tensor_utils_impl.h +244 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/prelu.h +111 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/process_broadcast_shapes.h +140 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/quantize.h +89 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/reduce.h +491 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/requantize.h +70 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/resize_bilinear.h +233 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/resize_nearest_neighbor.h +102 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/round.h +51 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/select.h +151 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/slice.h +80 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/softmax.h +233 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/space_to_batch_nd.h +109 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/space_to_depth.h +80 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/strided_slice.h +147 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/sub.h +465 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/tanh.h +129 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/transpose.h +203 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/reference/transpose_conv.h +225 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/runtime_shape.h +168 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/strided_slice_logic.h +278 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/tensor_ctypes.h +42 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/internal/types.h +1096 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/kernel_util.h +341 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/op_macros.h +49 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/kernels/padding.h +115 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/ibuffer_allocator.h +100 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/non_persistent_arena_buffer_allocator.h +104 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/persistent_arena_buffer_allocator.h +58 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/recording_single_arena_buffer_allocator.h +63 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/arena_allocator/single_arena_buffer_allocator.h +144 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/benchmarks/micro_benchmark.h +95 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/compatibility.h +32 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/cortex_m_generic/debug_log_callback.h +49 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/debug_log.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/micro_speech/micro_model_settings.h +37 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/network_tester/expected_output_data.h +47 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/network_tester/input_data.h +108 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/network_tester/network_model.h +166 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/person_detection/detection_responder.h +32 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/person_detection/image_provider.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/person_detection/main_functions.h +37 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/examples/person_detection/model_settings.h +35 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/fake_micro_context.h +70 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/flatbuffer_utils.h +65 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/activation_utils.h +57 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/activations.h +64 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/add.h +78 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_function_specializations.h +141 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_interface.h +75 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_slicers.h +56 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/mli_tf_utils.h +310 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/scratch_buf_mgr.h +145 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/arc_mli/scratch_buffers.h +78 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/ceva/ceva_common.h +24 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/ceva/ceva_tflm_lib.h +613 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/ceva/mcps_macros.h +115 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/ceva/types.h +1286 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/circular_buffer.h +45 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/circular_buffer_flexbuffers_generated_data.h +22 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/conv.h +117 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/conv_test.h +94 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/depthwise_conv.h +80 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/dequantize.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/detection_postprocess_flexbuffers_generated_data.h +25 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/ethosu.h +28 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/fully_connected.h +112 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/hard_swish.h +30 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/kernel_runner.h +86 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/kernel_util.h +150 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/leaky_relu.h +43 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/logical.h +35 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/logistic.h +42 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/lstm_eval.h +541 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/lstm_eval_test.h +817 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/lstm_shared.h +150 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/micro_ops.h +158 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/micro_tensor_utils.h +56 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/mul.h +74 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/pad.h +27 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/pooling.h +142 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/prelu.h +39 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/quantize.h +37 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/reduce.h +65 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/reshape.h +26 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/softmax.h +67 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/strided_slice.h +40 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/sub.h +60 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/svdf.h +100 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/testdata/conv_test_data.h +37 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/testdata/lstm_test_data.h +579 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/unidirectional_sequence_lstm.h +47 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/hifimini/fixedpoint_utils.h +139 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/lstm_eval.h +216 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/lstm_shared.h +78 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_add.h +48 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_conv.h +89 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_depthwise_conv.h +74 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_fully_connected.h +78 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_pad.h +49 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_pooling.h +76 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_reduce.h +47 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_reshape.h +44 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_softmax.h +58 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_svdf.h +39 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_helpers.h +64 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/greedy_memory_planner.h +170 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/linear_memory_planner.h +53 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/memory_plan_struct.h +73 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/micro_memory_planner.h +95 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/non_persistent_buffer_planner_shim.h +133 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_allocation_info.h +138 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_allocator.h +351 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_arena_constants.h +28 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_common.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_context.h +176 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_graph.h +79 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_interpreter.h +189 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_interpreter_context.h +125 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_interpreter_graph.h +110 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_log.h +42 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_mutable_op_resolver.h +708 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_op_resolver.h +62 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_profiler.h +140 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_profiler_interface.h +38 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_resource_variable.h +89 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_time.h +36 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/micro_utils.h +162 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/mock_micro_graph.h +60 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/python/interpreter/src/python_ops_resolver.h +21 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/python/tflite_size/src/flatbuffer_size.h +30 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/python/tflite_size/src/flatbuffer_size_wrapper.h +33 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/recording_micro_allocator.h +125 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/recording_micro_interpreter.h +69 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/system_setup.h +27 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/test_helper_custom_ops.h +49 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/test_helpers.h +334 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/testing/micro_test.h +267 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/testing/test_conv_model.h +23 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tflite_bridge/flatbuffer_conversions_bridge.h +45 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tflite_bridge/micro_error_reporter.h +36 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/log_utils.h +273 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/metrics.h +41 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/op_resolver.h +127 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/portable_type_to_tflitetype.h +75 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/schema/schema_generated.h +24644 -0
- xmos_ai_tools/runtime/include/tensorflow/lite/schema/schema_utils.h +33 -0
- xmos_ai_tools/runtime/include/tile_ram_server.h +38 -0
- xmos_ai_tools/runtime/lib/libhost_xtflitemicro.a +0 -0
- xmos_ai_tools/runtime/lib/libxtflitemicro.a +0 -0
- xmos_ai_tools/xformer/__init__.py +60 -0
- xmos_ai_tools/xformer/flash.py +190 -0
- xmos_ai_tools/xinterpreters/__init__.py +1 -0
- xmos_ai_tools/xinterpreters/exceptions.py +38 -0
- xmos_ai_tools/xinterpreters/host_interpreter.py +652 -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.dev80.data/data/bin/xcore-opt +0 -0
- xmos_ai_tools-1.3.2.dev80.dist-info/METADATA +33 -0
- xmos_ai_tools-1.3.2.dev80.dist-info/RECORD +395 -0
- xmos_ai_tools-1.3.2.dev80.dist-info/WHEEL +5 -0
- xmos_ai_tools-1.3.2.dev80.dist-info/top_level.txt +1 -0
@@ -0,0 +1,283 @@
|
|
1
|
+
/*
|
2
|
+
* Copyright 2021 Google Inc. All rights reserved.
|
3
|
+
*
|
4
|
+
* Licensed under the Apache License, Version 2.0 (the "License");
|
5
|
+
* you may not use this file except in compliance with the License.
|
6
|
+
* You may obtain a copy of the License at
|
7
|
+
*
|
8
|
+
* http://www.apache.org/licenses/LICENSE-2.0
|
9
|
+
*
|
10
|
+
* Unless required by applicable law or agreed to in writing, software
|
11
|
+
* distributed under the License is distributed on an "AS IS" BASIS,
|
12
|
+
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
|
13
|
+
* See the License for the specific language governing permissions and
|
14
|
+
* limitations under the License.
|
15
|
+
*/
|
16
|
+
|
17
|
+
#ifndef FLATBUFFERS_VERIFIER_H_
|
18
|
+
#define FLATBUFFERS_VERIFIER_H_
|
19
|
+
|
20
|
+
#include "flatbuffers/base.h"
|
21
|
+
#include "flatbuffers/util.h"
|
22
|
+
#include "flatbuffers/vector.h"
|
23
|
+
|
24
|
+
namespace flatbuffers {
|
25
|
+
|
26
|
+
// Helper class to verify the integrity of a FlatBuffer
|
27
|
+
class Verifier FLATBUFFERS_FINAL_CLASS {
|
28
|
+
public:
|
29
|
+
Verifier(const uint8_t *buf, size_t buf_len, uoffset_t _max_depth = 64,
|
30
|
+
uoffset_t _max_tables = 1000000, bool _check_alignment = true)
|
31
|
+
: buf_(buf),
|
32
|
+
size_(buf_len),
|
33
|
+
depth_(0),
|
34
|
+
max_depth_(_max_depth),
|
35
|
+
num_tables_(0),
|
36
|
+
max_tables_(_max_tables),
|
37
|
+
upper_bound_(0),
|
38
|
+
check_alignment_(_check_alignment),
|
39
|
+
flex_reuse_tracker_(nullptr) {
|
40
|
+
FLATBUFFERS_ASSERT(size_ < FLATBUFFERS_MAX_BUFFER_SIZE);
|
41
|
+
}
|
42
|
+
|
43
|
+
// Central location where any verification failures register.
|
44
|
+
bool Check(bool ok) const {
|
45
|
+
// clang-format off
|
46
|
+
#ifdef FLATBUFFERS_DEBUG_VERIFICATION_FAILURE
|
47
|
+
FLATBUFFERS_ASSERT(ok);
|
48
|
+
#endif
|
49
|
+
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
50
|
+
if (!ok)
|
51
|
+
upper_bound_ = 0;
|
52
|
+
#endif
|
53
|
+
// clang-format on
|
54
|
+
return ok;
|
55
|
+
}
|
56
|
+
|
57
|
+
// Verify any range within the buffer.
|
58
|
+
bool Verify(size_t elem, size_t elem_len) const {
|
59
|
+
// clang-format off
|
60
|
+
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
61
|
+
auto upper_bound = elem + elem_len;
|
62
|
+
if (upper_bound_ < upper_bound)
|
63
|
+
upper_bound_ = upper_bound;
|
64
|
+
#endif
|
65
|
+
// clang-format on
|
66
|
+
return Check(elem_len < size_ && elem <= size_ - elem_len);
|
67
|
+
}
|
68
|
+
|
69
|
+
bool VerifyAlignment(size_t elem, size_t align) const {
|
70
|
+
return Check((elem & (align - 1)) == 0 || !check_alignment_);
|
71
|
+
}
|
72
|
+
|
73
|
+
// Verify a range indicated by sizeof(T).
|
74
|
+
template<typename T> bool Verify(size_t elem) const {
|
75
|
+
return VerifyAlignment(elem, sizeof(T)) && Verify(elem, sizeof(T));
|
76
|
+
}
|
77
|
+
|
78
|
+
bool VerifyFromPointer(const uint8_t *p, size_t len) {
|
79
|
+
auto o = static_cast<size_t>(p - buf_);
|
80
|
+
return Verify(o, len);
|
81
|
+
}
|
82
|
+
|
83
|
+
// Verify relative to a known-good base pointer.
|
84
|
+
bool VerifyFieldStruct(const uint8_t *base, voffset_t elem_off,
|
85
|
+
size_t elem_len, size_t align) const {
|
86
|
+
auto f = static_cast<size_t>(base - buf_) + elem_off;
|
87
|
+
return VerifyAlignment(f, align) && Verify(f, elem_len);
|
88
|
+
}
|
89
|
+
|
90
|
+
template<typename T>
|
91
|
+
bool VerifyField(const uint8_t *base, voffset_t elem_off,
|
92
|
+
size_t align) const {
|
93
|
+
auto f = static_cast<size_t>(base - buf_) + elem_off;
|
94
|
+
return VerifyAlignment(f, align) && Verify(f, sizeof(T));
|
95
|
+
}
|
96
|
+
|
97
|
+
// Verify a pointer (may be NULL) of a table type.
|
98
|
+
template<typename T> bool VerifyTable(const T *table) {
|
99
|
+
return !table || table->Verify(*this);
|
100
|
+
}
|
101
|
+
|
102
|
+
// Verify a pointer (may be NULL) of any vector type.
|
103
|
+
template<typename T> bool VerifyVector(const Vector<T> *vec) const {
|
104
|
+
return !vec || VerifyVectorOrString(reinterpret_cast<const uint8_t *>(vec),
|
105
|
+
sizeof(T));
|
106
|
+
}
|
107
|
+
|
108
|
+
// Verify a pointer (may be NULL) of a vector to struct.
|
109
|
+
template<typename T> bool VerifyVector(const Vector<const T *> *vec) const {
|
110
|
+
return VerifyVector(reinterpret_cast<const Vector<T> *>(vec));
|
111
|
+
}
|
112
|
+
|
113
|
+
// Verify a pointer (may be NULL) to string.
|
114
|
+
bool VerifyString(const String *str) const {
|
115
|
+
size_t end;
|
116
|
+
return !str || (VerifyVectorOrString(reinterpret_cast<const uint8_t *>(str),
|
117
|
+
1, &end) &&
|
118
|
+
Verify(end, 1) && // Must have terminator
|
119
|
+
Check(buf_[end] == '\0')); // Terminating byte must be 0.
|
120
|
+
}
|
121
|
+
|
122
|
+
// Common code between vectors and strings.
|
123
|
+
bool VerifyVectorOrString(const uint8_t *vec, size_t elem_size,
|
124
|
+
size_t *end = nullptr) const {
|
125
|
+
auto veco = static_cast<size_t>(vec - buf_);
|
126
|
+
// Check we can read the size field.
|
127
|
+
if (!Verify<uoffset_t>(veco)) return false;
|
128
|
+
// Check the whole array. If this is a string, the byte past the array
|
129
|
+
// must be 0.
|
130
|
+
auto size = ReadScalar<uoffset_t>(vec);
|
131
|
+
auto max_elems = FLATBUFFERS_MAX_BUFFER_SIZE / elem_size;
|
132
|
+
if (!Check(size < max_elems))
|
133
|
+
return false; // Protect against byte_size overflowing.
|
134
|
+
auto byte_size = sizeof(size) + elem_size * size;
|
135
|
+
if (end) *end = veco + byte_size;
|
136
|
+
return Verify(veco, byte_size);
|
137
|
+
}
|
138
|
+
|
139
|
+
// Special case for string contents, after the above has been called.
|
140
|
+
bool VerifyVectorOfStrings(const Vector<Offset<String>> *vec) const {
|
141
|
+
if (vec) {
|
142
|
+
for (uoffset_t i = 0; i < vec->size(); i++) {
|
143
|
+
if (!VerifyString(vec->Get(i))) return false;
|
144
|
+
}
|
145
|
+
}
|
146
|
+
return true;
|
147
|
+
}
|
148
|
+
|
149
|
+
// Special case for table contents, after the above has been called.
|
150
|
+
template<typename T> bool VerifyVectorOfTables(const Vector<Offset<T>> *vec) {
|
151
|
+
if (vec) {
|
152
|
+
for (uoffset_t i = 0; i < vec->size(); i++) {
|
153
|
+
if (!vec->Get(i)->Verify(*this)) return false;
|
154
|
+
}
|
155
|
+
}
|
156
|
+
return true;
|
157
|
+
}
|
158
|
+
|
159
|
+
__supress_ubsan__("unsigned-integer-overflow") bool VerifyTableStart(
|
160
|
+
const uint8_t *table) {
|
161
|
+
// Check the vtable offset.
|
162
|
+
auto tableo = static_cast<size_t>(table - buf_);
|
163
|
+
if (!Verify<soffset_t>(tableo)) return false;
|
164
|
+
// This offset may be signed, but doing the subtraction unsigned always
|
165
|
+
// gives the result we want.
|
166
|
+
auto vtableo = tableo - static_cast<size_t>(ReadScalar<soffset_t>(table));
|
167
|
+
// Check the vtable size field, then check vtable fits in its entirety.
|
168
|
+
return VerifyComplexity() && Verify<voffset_t>(vtableo) &&
|
169
|
+
VerifyAlignment(ReadScalar<voffset_t>(buf_ + vtableo),
|
170
|
+
sizeof(voffset_t)) &&
|
171
|
+
Verify(vtableo, ReadScalar<voffset_t>(buf_ + vtableo));
|
172
|
+
}
|
173
|
+
|
174
|
+
template<typename T>
|
175
|
+
bool VerifyBufferFromStart(const char *identifier, size_t start) {
|
176
|
+
if (identifier && !Check((size_ >= 2 * sizeof(flatbuffers::uoffset_t) &&
|
177
|
+
BufferHasIdentifier(buf_ + start, identifier)))) {
|
178
|
+
return false;
|
179
|
+
}
|
180
|
+
|
181
|
+
// Call T::Verify, which must be in the generated code for this type.
|
182
|
+
auto o = VerifyOffset(start);
|
183
|
+
return o && reinterpret_cast<const T *>(buf_ + start + o)->Verify(*this)
|
184
|
+
// clang-format off
|
185
|
+
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
186
|
+
&& GetComputedSize()
|
187
|
+
#endif
|
188
|
+
;
|
189
|
+
// clang-format on
|
190
|
+
}
|
191
|
+
|
192
|
+
template<typename T>
|
193
|
+
bool VerifyNestedFlatBuffer(const Vector<uint8_t> *buf,
|
194
|
+
const char *identifier) {
|
195
|
+
if (!buf) return true;
|
196
|
+
Verifier nested_verifier(buf->data(), buf->size());
|
197
|
+
return nested_verifier.VerifyBuffer<T>(identifier);
|
198
|
+
}
|
199
|
+
|
200
|
+
// Verify this whole buffer, starting with root type T.
|
201
|
+
template<typename T> bool VerifyBuffer() { return VerifyBuffer<T>(nullptr); }
|
202
|
+
|
203
|
+
template<typename T> bool VerifyBuffer(const char *identifier) {
|
204
|
+
return VerifyBufferFromStart<T>(identifier, 0);
|
205
|
+
}
|
206
|
+
|
207
|
+
template<typename T> bool VerifySizePrefixedBuffer(const char *identifier) {
|
208
|
+
return Verify<uoffset_t>(0U) &&
|
209
|
+
ReadScalar<uoffset_t>(buf_) == size_ - sizeof(uoffset_t) &&
|
210
|
+
VerifyBufferFromStart<T>(identifier, sizeof(uoffset_t));
|
211
|
+
}
|
212
|
+
|
213
|
+
uoffset_t VerifyOffset(size_t start) const {
|
214
|
+
if (!Verify<uoffset_t>(start)) return 0;
|
215
|
+
auto o = ReadScalar<uoffset_t>(buf_ + start);
|
216
|
+
// May not point to itself.
|
217
|
+
if (!Check(o != 0)) return 0;
|
218
|
+
// Can't wrap around / buffers are max 2GB.
|
219
|
+
if (!Check(static_cast<soffset_t>(o) >= 0)) return 0;
|
220
|
+
// Must be inside the buffer to create a pointer from it (pointer outside
|
221
|
+
// buffer is UB).
|
222
|
+
if (!Verify(start + o, 1)) return 0;
|
223
|
+
return o;
|
224
|
+
}
|
225
|
+
|
226
|
+
uoffset_t VerifyOffset(const uint8_t *base, voffset_t start) const {
|
227
|
+
return VerifyOffset(static_cast<size_t>(base - buf_) + start);
|
228
|
+
}
|
229
|
+
|
230
|
+
// Called at the start of a table to increase counters measuring data
|
231
|
+
// structure depth and amount, and possibly bails out with false if
|
232
|
+
// limits set by the constructor have been hit. Needs to be balanced
|
233
|
+
// with EndTable().
|
234
|
+
bool VerifyComplexity() {
|
235
|
+
depth_++;
|
236
|
+
num_tables_++;
|
237
|
+
return Check(depth_ <= max_depth_ && num_tables_ <= max_tables_);
|
238
|
+
}
|
239
|
+
|
240
|
+
// Called at the end of a table to pop the depth count.
|
241
|
+
bool EndTable() {
|
242
|
+
depth_--;
|
243
|
+
return true;
|
244
|
+
}
|
245
|
+
|
246
|
+
// Returns the message size in bytes
|
247
|
+
size_t GetComputedSize() const {
|
248
|
+
// clang-format off
|
249
|
+
#ifdef FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE
|
250
|
+
uintptr_t size = upper_bound_;
|
251
|
+
// Align the size to uoffset_t
|
252
|
+
size = (size - 1 + sizeof(uoffset_t)) & ~(sizeof(uoffset_t) - 1);
|
253
|
+
return (size > size_) ? 0 : size;
|
254
|
+
#else
|
255
|
+
// Must turn on FLATBUFFERS_TRACK_VERIFIER_BUFFER_SIZE for this to work.
|
256
|
+
(void)upper_bound_;
|
257
|
+
FLATBUFFERS_ASSERT(false);
|
258
|
+
return 0;
|
259
|
+
#endif
|
260
|
+
// clang-format on
|
261
|
+
}
|
262
|
+
|
263
|
+
std::vector<uint8_t> *GetFlexReuseTracker() { return flex_reuse_tracker_; }
|
264
|
+
|
265
|
+
void SetFlexReuseTracker(std::vector<uint8_t> *rt) {
|
266
|
+
flex_reuse_tracker_ = rt;
|
267
|
+
}
|
268
|
+
|
269
|
+
private:
|
270
|
+
const uint8_t *buf_;
|
271
|
+
size_t size_;
|
272
|
+
uoffset_t depth_;
|
273
|
+
uoffset_t max_depth_;
|
274
|
+
uoffset_t num_tables_;
|
275
|
+
uoffset_t max_tables_;
|
276
|
+
mutable size_t upper_bound_;
|
277
|
+
bool check_alignment_;
|
278
|
+
std::vector<uint8_t> *flex_reuse_tracker_;
|
279
|
+
};
|
280
|
+
|
281
|
+
} // namespace flatbuffers
|
282
|
+
|
283
|
+
#endif // FLATBUFFERS_VERIFIER_H_
|
@@ -0,0 +1,44 @@
|
|
1
|
+
#ifndef _io_server_h_
|
2
|
+
#define _io_server_h_
|
3
|
+
|
4
|
+
#ifdef __XC__
|
5
|
+
|
6
|
+
void ioserver(chanend c_model[], unsigned n_model);
|
7
|
+
|
8
|
+
#else
|
9
|
+
|
10
|
+
#include <xcore/chanend.h>
|
11
|
+
#include <xcore/channel.h>
|
12
|
+
|
13
|
+
#define CMD_LENGTH_BYTES (3) // CMD, Model, Tensor
|
14
|
+
|
15
|
+
#define IOSERVER_INVOKE 1
|
16
|
+
#define IOSERVER_TENSOR_SEND_OUTPUT 2
|
17
|
+
#define IOSERVER_TENSOR_RECV_INPUT 3
|
18
|
+
#define IOSERVER_ACK 5
|
19
|
+
#define IOSERVER_NACK 6
|
20
|
+
#define IOSERVER_RESET 7
|
21
|
+
#define IOSERVER_EXIT 8
|
22
|
+
|
23
|
+
#define MAX_PACKET_SIZE (512)
|
24
|
+
#define MAX_PACKET_SIZE_WORDS (MAX_PACKET_SIZE / 4)
|
25
|
+
|
26
|
+
#ifdef __cplusplus
|
27
|
+
extern "C" {
|
28
|
+
#endif
|
29
|
+
unsigned int ioserver_command_receive(chanend_t c_server, unsigned *tensor_num);
|
30
|
+
void ioserver_command_acknowledge(chanend_t c_server, unsigned int ack);
|
31
|
+
void ioserver_tensor_send_output(chanend_t c_server, unsigned int *data,
|
32
|
+
unsigned int n);
|
33
|
+
|
34
|
+
void ioserver_tensor_recv_input(chanend_t c_server, unsigned int *data,
|
35
|
+
unsigned int n);
|
36
|
+
|
37
|
+
void ioserver(chanend_t c_model[], unsigned n_model);
|
38
|
+
#ifdef __cplusplus
|
39
|
+
}
|
40
|
+
#endif
|
41
|
+
|
42
|
+
#endif
|
43
|
+
|
44
|
+
#endif
|
@@ -0,0 +1,24 @@
|
|
1
|
+
// Copyright 2021 XMOS LIMITED. This Software is subject to the terms of the
|
2
|
+
// XMOS Public License: Version 1
|
3
|
+
#include <array>
|
4
|
+
#include <cstdint>
|
5
|
+
#include <vector>
|
6
|
+
|
7
|
+
class ConvParams {
|
8
|
+
public:
|
9
|
+
ConvParams(std::array<int, 4> ks, std::vector<int8_t> weights, int h, int w) :
|
10
|
+
subH(h), subW(w), kernelShape(ks) , weights(weights){}
|
11
|
+
|
12
|
+
public:
|
13
|
+
int subH;
|
14
|
+
int subW;
|
15
|
+
std::array<int, 4> kernelShape;
|
16
|
+
std::vector<int8_t> weights;
|
17
|
+
};
|
18
|
+
|
19
|
+
std::vector<ConvParams> transpose_conv_reorder_kernel_weights(
|
20
|
+
int8_t *raw_weights,
|
21
|
+
std::array<int, 4> &shape,
|
22
|
+
int32_t stride_height, //vertical
|
23
|
+
int32_t stride_width //horizontal
|
24
|
+
) ;
|
@@ -0,0 +1,27 @@
|
|
1
|
+
#ifndef _add_int16_h_
|
2
|
+
#define _add_int16_h_
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Function that implements a addition of two 16-bit tensors.
|
6
|
+
* The blob must have been created by a call to
|
7
|
+
* ``add_int16_tensor_blob()``
|
8
|
+
*
|
9
|
+
* @param output Output tensor
|
10
|
+
* Must be word-aligned
|
11
|
+
*
|
12
|
+
* @param input1 Input tensor operand 1
|
13
|
+
* Must be word-aligned
|
14
|
+
*
|
15
|
+
* @param input1 Input tensor operand 2
|
16
|
+
* Must be word-aligned
|
17
|
+
*
|
18
|
+
* @param blob Transformed constant input tensor
|
19
|
+
* Must be word-aligned
|
20
|
+
*
|
21
|
+
* @param tensor_length Number of elements in the tensor (product of all dimensions)
|
22
|
+
* There are no constraints on this number.
|
23
|
+
*/
|
24
|
+
void add_int16_tensor(int16_t *output, int16_t *input1, int16_t *input2,
|
25
|
+
int tensor_length, void *blob);
|
26
|
+
|
27
|
+
#endif
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#ifndef _add_int16_transform_h_
|
2
|
+
#define _add_int16_transform_h_
|
3
|
+
|
4
|
+
#include "nn_api.h"
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Function that performs the compile time transformation of an int16 addition
|
9
|
+
* between two tensors.
|
10
|
+
*
|
11
|
+
* this function should be
|
12
|
+
* called at compile-time, and at run-time the output of this function shall be passed
|
13
|
+
* as the second input tensor of ``add_int16_tensor``
|
14
|
+
*
|
15
|
+
* @param output Output of the function; a blob of
|
16
|
+
* ``ADD_INT16_TENSOR_BYTES()`` bytes.
|
17
|
+
* Must be word-aligned.
|
18
|
+
*
|
19
|
+
* @param input1_scaler Quantisation scaler for input1
|
20
|
+
* Negate this to make add compute -A+B
|
21
|
+
*
|
22
|
+
* @param input2_scaler Quantisation scaler for input2
|
23
|
+
* Negate this to make add compute A-B
|
24
|
+
*
|
25
|
+
* @param output_scaler Quantisation scaler for output
|
26
|
+
*
|
27
|
+
* @returns 1 on success, 0 on fail (fallback required)
|
28
|
+
*/
|
29
|
+
C_API int add_int16_tensor_blob(void *output,
|
30
|
+
float input1_scaler,
|
31
|
+
float input2_scaler,
|
32
|
+
float output_scaler,
|
33
|
+
char *err_msg);
|
34
|
+
|
35
|
+
/**
|
36
|
+
* Macro that calculates the number of int16_t that should be allocated to
|
37
|
+
* store the output of ``add_int16_tensor_blob()``
|
38
|
+
*/
|
39
|
+
#define ADD_INT16_TENSOR_BYTES() (2 * 16 * sizeof(int16_t))
|
40
|
+
|
41
|
+
|
42
|
+
#endif
|
@@ -0,0 +1,22 @@
|
|
1
|
+
#ifndef _dequantize_int16_h_
|
2
|
+
#define _dequantize_int16_h_
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Function that implements dequantization of a 16-bit tensor to a 32-bit tensor.
|
6
|
+
* The blob must have been created by a call to ``dequantize_int16_tensor_blob()``
|
7
|
+
*
|
8
|
+
* @param output Output tensor
|
9
|
+
* Must be word-aligned
|
10
|
+
*
|
11
|
+
* @param input Input tensor
|
12
|
+
*
|
13
|
+
* @param blob Transformed constant input tensor
|
14
|
+
* Must be word-aligned
|
15
|
+
*
|
16
|
+
* @param tensor_length Number of elements in the tensor (product of all dimensions)
|
17
|
+
* There are no constraints on this number.
|
18
|
+
*/
|
19
|
+
void dequantize_int16_tensor(float *output, int16_t *input,
|
20
|
+
int tensor_length, void *blob);
|
21
|
+
|
22
|
+
#endif
|
@@ -0,0 +1,34 @@
|
|
1
|
+
#ifndef _dequantize_int16_transform_h_
|
2
|
+
#define _dequantize_int16_transform_h_
|
3
|
+
|
4
|
+
#include "nn_api.h"
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
/**
|
8
|
+
* Function that performs the compile time transformation of an int16 addition
|
9
|
+
* between two tensors.
|
10
|
+
*
|
11
|
+
* this function should be
|
12
|
+
* called at compile-time, and at run-time the output of this function shall be passed
|
13
|
+
* as the second input tensor of ``dequantize_int16_tensor``
|
14
|
+
*
|
15
|
+
* @param output Output of the function; a blob of
|
16
|
+
* ``DEQUANTIZE_INT16_TENSOR_BYTES()`` bytes.
|
17
|
+
* Must be word-aligned.
|
18
|
+
*
|
19
|
+
* @param input_scaler Quantisation scaler for the input
|
20
|
+
*
|
21
|
+
* @returns 1 on success, 0 on fail (fallback required)
|
22
|
+
*/
|
23
|
+
C_API int dequantize_int16_tensor_blob(void *output,
|
24
|
+
float input_scaler,
|
25
|
+
char *err_msg);
|
26
|
+
|
27
|
+
/**
|
28
|
+
* Macro that calculates the number of int16_t that should be allocated to
|
29
|
+
* store the output of ``dequantize_int16_tensor_blob()``
|
30
|
+
*/
|
31
|
+
#define DEQUANTIZE_INT16_TENSOR_BYTES() (2 * sizeof(float))
|
32
|
+
|
33
|
+
|
34
|
+
#endif
|
@@ -0,0 +1,42 @@
|
|
1
|
+
#ifndef _multiply_int16_h_
|
2
|
+
#define _multiply_int16_h_
|
3
|
+
|
4
|
+
/**
|
5
|
+
* Function that implements a multiplication of two 16-bit tensors where
|
6
|
+
* both tensors are variable. The blob must have been created by a call to
|
7
|
+
* ``multiply_int16_tensor_blob()``
|
8
|
+
*
|
9
|
+
* @param output Output tensor
|
10
|
+
* Must be word-aligned
|
11
|
+
*
|
12
|
+
* @param input Non constant input tensor
|
13
|
+
* Must be word-aligned
|
14
|
+
*
|
15
|
+
* @param blob Transformed constant input tensor
|
16
|
+
* Must be word-aligned
|
17
|
+
*
|
18
|
+
* @param tensor_length Number of elements in the tensor (product of all dimensions)
|
19
|
+
* There are no constraints on this number.
|
20
|
+
*/
|
21
|
+
void multiply_int16_tensor(int16_t *output, int16_t *input1, int16_t *input2,
|
22
|
+
int tensor_length, void *blob);
|
23
|
+
|
24
|
+
/**
|
25
|
+
* Function that implements a requantifies a 16-bit tensor. The blob must have been
|
26
|
+
* created at compile time using ``requantise_int16_tensor_blob()``
|
27
|
+
*
|
28
|
+
* @param output Output tensor
|
29
|
+
* Must be word-aligned
|
30
|
+
*
|
31
|
+
* @param input Non constant input tensor
|
32
|
+
* Must be word-aligned
|
33
|
+
*
|
34
|
+
* @param tensor_length Number of elements in the tensor (product of all dimensions)
|
35
|
+
* There are no constraints on this number.
|
36
|
+
*
|
37
|
+
* @param blob Transformed constant input tensor
|
38
|
+
* Must be word-aligned
|
39
|
+
*/
|
40
|
+
void requantize_int16_tensor(int16_t *output, int16_t *input1, int tensor_length, void *blob);
|
41
|
+
|
42
|
+
#endif
|
@@ -0,0 +1,71 @@
|
|
1
|
+
#ifndef _multiply_int16_transform_h_
|
2
|
+
#define _multiply_int16_transform_h_
|
3
|
+
|
4
|
+
#include "nn_api.h"
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
|
8
|
+
/**
|
9
|
+
* Function that performs the compile time transformation of an int16 to int16
|
10
|
+
* re-quantisation.
|
11
|
+
*
|
12
|
+
* For an int16 re-quantisation, this function should be
|
13
|
+
* called at compile-time, and at run-time the output of this function shall be passed
|
14
|
+
* as the second input tensor of ``requantise_int16_tensor``
|
15
|
+
*
|
16
|
+
* @param output Output of the function; a blob of
|
17
|
+
* ``REQUANTISE_INT16_BYTES()`` bytes.
|
18
|
+
* Must be word-aligned.
|
19
|
+
*
|
20
|
+
* @param input1_scaler Quantisation scaler for input
|
21
|
+
*
|
22
|
+
* @param output_scaler Quantisation scaler for output
|
23
|
+
*
|
24
|
+
* @returns 1 on success, 0 on fail (fallback required)
|
25
|
+
*/
|
26
|
+
C_API int requantize_int16_tensor_blob(void *output,
|
27
|
+
float input_scaler,
|
28
|
+
float output_scaler,
|
29
|
+
char *err_msg);
|
30
|
+
/**
|
31
|
+
* Macro that calculates the number of int16_t that should be allocated to
|
32
|
+
* store the output of ``quantise_int16_tensor_blob()``
|
33
|
+
*/
|
34
|
+
#define REQUANTIZE_INT16_TENSOR_BYTES() (16 * sizeof(int16_t))
|
35
|
+
|
36
|
+
|
37
|
+
/**
|
38
|
+
* Function that performs the compile time transformation of an int16 multiplication
|
39
|
+
* between two tensors.
|
40
|
+
*
|
41
|
+
* this function should be
|
42
|
+
* called at compile-time, and at run-time the output of this function shall be passed
|
43
|
+
* as the second input tensor of ``multiply_int16_tensor``
|
44
|
+
*
|
45
|
+
* @param output Output of the function; a blob of
|
46
|
+
* ``MULTIPLY_INT16_TENSOR_BYTES()`` bytes.
|
47
|
+
* Must be word-aligned.
|
48
|
+
*
|
49
|
+
* @param input1_scaler Quantisation scaler for input1
|
50
|
+
*
|
51
|
+
* @param input2_scaler Quantisation scaler for input2
|
52
|
+
*
|
53
|
+
* @param output_scaler Quantisation scaler for output
|
54
|
+
*
|
55
|
+
* @returns 1 on success, 0 on fail (fallback required)
|
56
|
+
*/
|
57
|
+
C_API int multiply_int16_tensor_blob(void *output,
|
58
|
+
float input1_scaler,
|
59
|
+
float input2_scaler,
|
60
|
+
float output_scaler,
|
61
|
+
char *err_msg);
|
62
|
+
|
63
|
+
/**
|
64
|
+
* Macro that calculates the number of int16_t that should be allocated to
|
65
|
+
* store the output of ``multiply_int16_tensor_blob()``
|
66
|
+
* TODO: this could be zero and stored in the pointer...
|
67
|
+
*/
|
68
|
+
#define MULTIPLY_INT16_TENSOR_BYTES() (2 * sizeof(int16_t))
|
69
|
+
|
70
|
+
|
71
|
+
#endif
|
@@ -0,0 +1,14 @@
|
|
1
|
+
// Copyright 2020-2021 XMOS LIMITED.
|
2
|
+
// This Software is subject to the terms of the XMOS Public Licence: Version 1.
|
3
|
+
#ifndef NN_BNN_TYPES_H
|
4
|
+
#define NN_BNN_TYPES_H
|
5
|
+
#include <stdint.h>
|
6
|
+
|
7
|
+
typedef int8_t bnn_bool_t;
|
8
|
+
typedef int32_t bnn_b32_t;
|
9
|
+
|
10
|
+
typedef struct bnn_b256_t {
|
11
|
+
bnn_b32_t d[8];
|
12
|
+
} bnn_b256_t;
|
13
|
+
|
14
|
+
#endif // NN_BNN_TYPES_H
|