xmos-ai-tools 1.3.2.dev232__py3-none-macosx_10_15_universal2.whl → 1.3.2.dev256__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.
@@ -8,22 +8,35 @@ namespace shared_config {
8
8
  // between xformer and lib_tflite_micro in the flatbuffer
9
9
  constexpr char xcoreMetadataName[] = "xcoreSharedConfig";
10
10
 
11
- struct xcore_metadata {
12
- // Dummy variable for aligning the metadata struct to 16 bytes
13
- // We cannot use alignas(16) yet in xcore
14
- int32_t padding[2];
11
+ constexpr int xcoreMaxNumOfTensors = 25;
12
+
13
+ struct tensor_info_t {
14
+ uint32_t index;
15
+ uint32_t external_address;
16
+ uint32_t size;
17
+ };
18
+
19
+ // The metadata struct must be aligned to 16 bytes
20
+ // We cannot use alignas(16) yet in xcore
21
+ struct xcore_metadata_t {
15
22
  // Versions of libraries used to build the model
16
- int32_t lib_nn_major_version;
17
- int32_t lib_nn_minor_version;
18
- int32_t lib_nn_patch_version;
19
- int32_t lib_tflite_micro_major_version;
20
- int32_t lib_tflite_micro_minor_version;
21
- int32_t lib_tflite_micro_patch_version;
22
- int32_t xformer_major_version;
23
- int32_t xformer_minor_version;
24
- int32_t xformer_patch_version;
23
+ uint32_t lib_nn_major_version;
24
+ uint32_t lib_nn_minor_version;
25
+ uint32_t lib_nn_patch_version;
26
+ uint32_t lib_tflite_micro_major_version;
27
+ uint32_t lib_tflite_micro_minor_version;
28
+ uint32_t lib_tflite_micro_patch_version;
29
+ uint32_t xformer_major_version;
30
+ uint32_t xformer_minor_version;
31
+ uint32_t xformer_patch_version;
25
32
  // Number of threads required from the runtime to execute the model
26
- int32_t required_thread_count;
33
+ uint32_t required_thread_count;
34
+ // Number of input tensors loaded from external memory
35
+ uint32_t num_external_input_tensors;
36
+ // Number of output tensors loaded from external memory
37
+ uint32_t num_external_output_tensors;
38
+ tensor_info_t external_input_tensors_data[xcoreMaxNumOfTensors];
39
+ tensor_info_t external_output_tensors_data[xcoreMaxNumOfTensors];
27
40
  };
28
41
 
29
42
  } // namespace shared_config
@@ -22,6 +22,8 @@ limitations under the License.
22
22
  namespace tflite_micro {
23
23
 
24
24
  constexpr int kOnlinePlannedBuffer = -1;
25
+ // We are using this to mark a buffer explicitly as externally offline allocated
26
+ constexpr int kXcoreOfflinePlannedBuffer = -111;
25
27
 
26
28
  // A memory planner that uses a greedy algorithm to arrange buffers in memory
27
29
  // to minimize the overall arena size needed.
Binary file
@@ -127,8 +127,9 @@ class TFLMHostInterpreter:
127
127
  @param model_index The model to target, for interpreters that support multiple models
128
128
  running concurrently. Defaults to 0 for use with a single model.
129
129
  """
130
- max_model_size = 50000000
131
- self.obj = lib.new_interpreter(max_model_size, max_model_size)
130
+ max_arena_size = 50000000
131
+ external_memory_size = 50000000
132
+ self.obj = lib.new_interpreter(max_arena_size, external_memory_size)
132
133
  currentModel = None
133
134
 
134
135
  for model in self.models:
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: xmos_ai_tools
3
- Version: 1.3.2.dev232
3
+ Version: 1.3.2.dev256
4
4
  Summary: XMOS AI Tools
5
5
  Home-page: https://github.com/xmos/ai_tools
6
6
  Author: XMOS
@@ -41,4 +41,4 @@ Dynamic: summary
41
41
  Documentation
42
42
  -------------
43
43
 
44
- Click [here](https://github.com/xmos/ai_tools/blob/24050bb7d969295eacb8b21cc5a4a4df778147a3/README.md) for documentation on using xmos-ai-tools to deploy AI models on xcore.
44
+ Click [here](https://github.com/xmos/ai_tools/blob/87ffb35b87ae897e79bd2b2b091f825df2268662/README.md) for documentation on using xmos-ai-tools to deploy AI models on xcore.
@@ -78,7 +78,7 @@ xmos_ai_tools/runtime/include/lib_tflite_micro/api/memory_parallel_transport.h,s
78
78
  xmos_ai_tools/runtime/include/lib_tflite_micro/api/version.h,sha256=ImFxGU2PzLZ3TzGiB1V2Ghgd2yh0qWR7UI7ao-MrG6w,318
79
79
  xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_config.h,sha256=gywR3hBJe05GTLkcdJss0bmk3dzsWivXK6U9FF7Pfm0,589
80
80
  xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_device_memory.h,sha256=bLWcRDNrzClLh8_eR3XRRz3sA2pEAzzxGLDoPTsNp8A,1917
81
- xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_shared_config.h,sha256=qv3cxHGUHDxdR0xlfdd0qWDOd4V0vwPkmYEVka_j6xw,1015
81
+ xmos_ai_tools/runtime/include/lib_tflite_micro/api/xcore_shared_config.h,sha256=bcpjAc7bfGrxovRkBZIr3hu4vpayX-TdhjCNrYXzQik,1451
82
82
  xmos_ai_tools/runtime/include/lib_tflite_micro/src/thread_call.h,sha256=KNG-3gNWMSonzYTGbk4L0kT8WU9JD0bOzlk8naz7JO0,4965
83
83
  xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/conv2d_float.h,sha256=XfVVWAKhbv6nByOzO1j6WA4oQ4RTX3PvYx22f-_3JFA,7681
84
84
  xmos_ai_tools/runtime/include/lib_tflite_micro/src/tflite-xcore-kernels/xcore_custom_options.h,sha256=lC4Tw1Pxxg3zOXRdqNNtokuU-_cX9TTkYmGLe47-9dQ,630
@@ -362,7 +362,7 @@ xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_reshap
362
362
  xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_softmax.h,sha256=YdqdqJWO3Z98A0ZnBoOqEwxKssrxLtdo34n9q7Fb0Bc,2221
363
363
  xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/xtensa_svdf.h,sha256=bjGNE3Om4UmwRt-dTH4hrxefESiH14hx55tME77Ip14,1513
364
364
  xmos_ai_tools/runtime/include/tensorflow/lite/micro/kernels/xtensa/hifimini/fixedpoint_utils.h,sha256=wCfzgUMDfuhpNacv6oEkRxnL53K0jUaYHYZoWbcH3ME,5204
365
- xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/greedy_memory_planner.h,sha256=zFbOFlWdjKYuBV-iKW-CzXI2FfPgERDaMB2s478euXI,7246
365
+ xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/greedy_memory_planner.h,sha256=rylOZj9xMLNfJrfCshfKlmHPW8x3qNAoEFWo7ygPvFk,7377
366
366
  xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/linear_memory_planner.h,sha256=nn2dlEk2cVobNR8aSUpPz1Fb7XT_WcOC2QCYDesCIqU,1931
367
367
  xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/memory_plan_struct.h,sha256=pE5VCrP59Y7nrISKw-H3fThfmL5n26gzvrHqk9CKulU,3011
368
368
  xmos_ai_tools/runtime/include/tensorflow/lite/micro/memory_planner/micro_memory_planner.h,sha256=mgKMG_3yUeOgPDLxgG0lXeA2Qw1rtlMeex_CeSlfeoU,3942
@@ -379,17 +379,17 @@ xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/metrics.h
379
379
  xmos_ai_tools/runtime/include/tensorflow/lite/micro/tools/benchmarking/op_resolver.h,sha256=g0dl9tzUqngiINvjBlqDclFqvkC85MC4kbU13vE4OkY,6071
380
380
  xmos_ai_tools/runtime/include/tensorflow/lite/schema/schema_generated.h,sha256=hSumwEqc-LmMHG82KKl1yPLiVMNbLj_q19-VRPCR7ng,1093175
381
381
  xmos_ai_tools/runtime/include/tensorflow/lite/schema/schema_utils.h,sha256=tkHMDPARjIqppYCVInIowwdHxjNP3pfSS9O7vx-ODeo,1333
382
- xmos_ai_tools/runtime/lib/libhost_xtflitemicro.a,sha256=-5Wh8DvSGKZM8yLfLNXaSMlHmN2-FO0OlBYGVNe3OS8,2468232
383
- xmos_ai_tools/runtime/lib/libxtflitemicro.a,sha256=zMcXwpvNBEX-kIq_jBajm10WKhFMQdj_CTo3VIIzgCw,71830940
382
+ xmos_ai_tools/runtime/lib/libhost_xtflitemicro.a,sha256=rKuGy3O9BR9S4bwcHo0mJ1v5Bm7E6xySnZiZB2YKOVo,2468232
383
+ xmos_ai_tools/runtime/lib/libxtflitemicro.a,sha256=6yyWcidNhaN2BEBmbznT2bnw07i-xQM1V0QySTHEuQ4,71830940
384
384
  xmos_ai_tools/xformer/__init__.py,sha256=a4K06oiSu2TYVwGvzwMDGGejPUYTvW9-5Uw6SfuFCX4,1903
385
385
  xmos_ai_tools/xformer/flash.py,sha256=MG4coi_Lvvg-oQmw1pomJD8eeOH4gAMjixjBFvO2BCk,6376
386
386
  xmos_ai_tools/xinterpreters/__init__.py,sha256=PFRB9VxOLKaA--j2ZvWGcmesv2C6uNYqJ_kBam68aUI,50
387
387
  xmos_ai_tools/xinterpreters/exceptions.py,sha256=HOjADxHYMPI9mN0YIbWxtw9hSeL2B6XWWwqtGtyJdVs,577
388
- xmos_ai_tools/xinterpreters/host_interpreter.py,sha256=9oZVFVGs34dkBAyye-8pg1TTfCj8B1ZvbsBKB0HnBtY,25709
389
- xmos_ai_tools/xinterpreters/libs/macos/xtflm_python.1.0.1.dylib,sha256=snXJNzi2mM4-YB_5wbx2-C602nv_Jdfl_yqr9M5sZ30,2357816
390
- xmos_ai_tools/xinterpreters/libs/macos/xtflm_python.dylib,sha256=snXJNzi2mM4-YB_5wbx2-C602nv_Jdfl_yqr9M5sZ30,2357816
391
- xmos_ai_tools-1.3.2.dev232.data/data/bin/xcore-opt,sha256=IdAQD2i4_2Rj3XGzmc3JigXXCKZABPt0pPpdGMo_mqw,286222392
392
- xmos_ai_tools-1.3.2.dev232.dist-info/METADATA,sha256=kQpVAtse6xSBNRR6FnCm-VIZIpAVRHEIb-dcDRrBEhk,1574
393
- xmos_ai_tools-1.3.2.dev232.dist-info/WHEEL,sha256=HwB_UO1X29gO_-RNo4EXa9K4pIwQmN1aaAHIeI9Tfw8,112
394
- xmos_ai_tools-1.3.2.dev232.dist-info/top_level.txt,sha256=YWegea73ll3tMlRWRdHJemUy2VOuEYDdOIaffxu_eF0,14
395
- xmos_ai_tools-1.3.2.dev232.dist-info/RECORD,,
388
+ xmos_ai_tools/xinterpreters/host_interpreter.py,sha256=ZdvzXUnAdnCcSU-dNQvq6ad2MDk9PZqu9UyNoBgBYKI,25755
389
+ xmos_ai_tools/xinterpreters/libs/macos/xtflm_python.1.0.1.dylib,sha256=oJpZXxT1c2gF_YGaWvcwe0B7Je9pBVy1NF4QnIJfIMI,2359240
390
+ xmos_ai_tools/xinterpreters/libs/macos/xtflm_python.dylib,sha256=oJpZXxT1c2gF_YGaWvcwe0B7Je9pBVy1NF4QnIJfIMI,2359240
391
+ xmos_ai_tools-1.3.2.dev256.data/data/bin/xcore-opt,sha256=oIZCVKsylh4bEmmYhqOy0Q63o-32fN6oImQ68gO4wxE,286345240
392
+ xmos_ai_tools-1.3.2.dev256.dist-info/METADATA,sha256=6MPEatNa9U-0BQdljtAPw545y4bWEFSG2BRzBNtVuuE,1574
393
+ xmos_ai_tools-1.3.2.dev256.dist-info/WHEEL,sha256=HwB_UO1X29gO_-RNo4EXa9K4pIwQmN1aaAHIeI9Tfw8,112
394
+ xmos_ai_tools-1.3.2.dev256.dist-info/top_level.txt,sha256=YWegea73ll3tMlRWRdHJemUy2VOuEYDdOIaffxu_eF0,14
395
+ xmos_ai_tools-1.3.2.dev256.dist-info/RECORD,,