From dc0c6ed9f8b993e63f492f203d7d7080ab4c835c Mon Sep 17 00:00:00 2001 From: Richard Burton Date: Wed, 8 Apr 2020 16:39:05 +0100 Subject: Add PyArmNN to work with ArmNN API of 20.02 * Add Swig rules for generating python wrapper * Add documentation * Add tests and testing data Change-Id: If48eda08931514fa21e72214dfead2835f07237c Signed-off-by: Richard Burton Signed-off-by: Derek Lamberti --- .../shared/caffe_parser/golden_output_caffe.npy | Bin 0 -> 168 bytes .../testdata/shared/caffe_parser/input_caffe.npy | Bin 0 -> 3264 bytes python/pyarmnn/test/testdata/shared/license.txt | 10 + .../test/testdata/shared/mock_model.caffemodel | Bin 0 -> 138926 bytes .../pyarmnn/test/testdata/shared/mock_model.onnx | Bin 0 -> 139104 bytes python/pyarmnn/test/testdata/shared/mock_model.pb | Bin 0 -> 141105 bytes .../pyarmnn/test/testdata/shared/mock_model.tflite | Bin 0 -> 37944 bytes .../test/testdata/shared/mock_profile_out.json | 216 +++++++++++++++++++++ .../shared/onnx_parser/golden_output_onnx.npy | Bin 0 -> 168 bytes .../testdata/shared/onnx_parser/input_onnx.npy | Bin 0 -> 3264 bytes .../testdata/shared/tf_parser/golden_output_tf.npy | Bin 0 -> 168 bytes .../test/testdata/shared/tf_parser/input_tf.npy | Bin 0 -> 3264 bytes .../shared/tflite_parser/golden_output_lite.npy | Bin 0 -> 138 bytes .../testdata/shared/tflite_parser/input_lite.npy | Bin 0 -> 912 bytes 14 files changed, 226 insertions(+) create mode 100644 python/pyarmnn/test/testdata/shared/caffe_parser/golden_output_caffe.npy create mode 100644 python/pyarmnn/test/testdata/shared/caffe_parser/input_caffe.npy create mode 100644 python/pyarmnn/test/testdata/shared/license.txt create mode 100644 python/pyarmnn/test/testdata/shared/mock_model.caffemodel create mode 100644 python/pyarmnn/test/testdata/shared/mock_model.onnx create mode 100644 python/pyarmnn/test/testdata/shared/mock_model.pb create mode 100644 python/pyarmnn/test/testdata/shared/mock_model.tflite create mode 100644 python/pyarmnn/test/testdata/shared/mock_profile_out.json create mode 100644 python/pyarmnn/test/testdata/shared/onnx_parser/golden_output_onnx.npy create mode 100644 python/pyarmnn/test/testdata/shared/onnx_parser/input_onnx.npy create mode 100644 python/pyarmnn/test/testdata/shared/tf_parser/golden_output_tf.npy create mode 100644 python/pyarmnn/test/testdata/shared/tf_parser/input_tf.npy create mode 100644 python/pyarmnn/test/testdata/shared/tflite_parser/golden_output_lite.npy create mode 100644 python/pyarmnn/test/testdata/shared/tflite_parser/input_lite.npy (limited to 'python/pyarmnn/test/testdata/shared') diff --git a/python/pyarmnn/test/testdata/shared/caffe_parser/golden_output_caffe.npy b/python/pyarmnn/test/testdata/shared/caffe_parser/golden_output_caffe.npy new file mode 100644 index 0000000000..007141cb9f Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/caffe_parser/golden_output_caffe.npy differ diff --git a/python/pyarmnn/test/testdata/shared/caffe_parser/input_caffe.npy b/python/pyarmnn/test/testdata/shared/caffe_parser/input_caffe.npy new file mode 100644 index 0000000000..15df758b58 Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/caffe_parser/input_caffe.npy differ diff --git a/python/pyarmnn/test/testdata/shared/license.txt b/python/pyarmnn/test/testdata/shared/license.txt new file mode 100644 index 0000000000..1e95a68e0d --- /dev/null +++ b/python/pyarmnn/test/testdata/shared/license.txt @@ -0,0 +1,10 @@ +This folder contains models and data needed for the testing of PyArmNN. + +All models and files found in this folder were created by ARM for the purpose +of testing PyArmNN. + +All the contents of this folder are distributed with the following license. + +Copyright © 2020 Arm Ltd. All rights reserved. +SPDX-License-Identifier: MIT + diff --git a/python/pyarmnn/test/testdata/shared/mock_model.caffemodel b/python/pyarmnn/test/testdata/shared/mock_model.caffemodel new file mode 100644 index 0000000000..df4079b729 Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/mock_model.caffemodel differ diff --git a/python/pyarmnn/test/testdata/shared/mock_model.onnx b/python/pyarmnn/test/testdata/shared/mock_model.onnx new file mode 100644 index 0000000000..c1b506cc16 Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/mock_model.onnx differ diff --git a/python/pyarmnn/test/testdata/shared/mock_model.pb b/python/pyarmnn/test/testdata/shared/mock_model.pb new file mode 100644 index 0000000000..cff9dc7add Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/mock_model.pb differ diff --git a/python/pyarmnn/test/testdata/shared/mock_model.tflite b/python/pyarmnn/test/testdata/shared/mock_model.tflite new file mode 100644 index 0000000000..0b8944d3ed Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/mock_model.tflite differ diff --git a/python/pyarmnn/test/testdata/shared/mock_profile_out.json b/python/pyarmnn/test/testdata/shared/mock_profile_out.json new file mode 100644 index 0000000000..8e1056160b --- /dev/null +++ b/python/pyarmnn/test/testdata/shared/mock_profile_out.json @@ -0,0 +1,216 @@ +{ + "ArmNN": { + "inference_measurements_#1": { + "type": "Event", + "Wall clock time_#1": { + "type": "Measurement", + "raw": [ + 1.1, + 2.2, + 3.3, + 4.4, + 5.5, + 6.6 + ], + "unit": "us" + }, + + "Execute_#2": { + "type": "Event", + "Wall clock time_#2": { + "type": "Measurement", + "raw": [ + 1.1, + 2.2, + 3.3, + 4.4, + 5.5, + 6.6 + ], + "unit": "us" + }, + "Wall clock time (Start)_#2": { + "type": "Measurement", + "raw": [ + 1, + 1, + 1, + 1, + 1, + 1 + ], + "unit": "us" + }, + "Wall clock time (Stop)_#2": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + + "RefSomeMock1dWorkload_Execute_#5": { + "type": "Event", + "Wall clock time_#5": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Start)_#5": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Stop)_#5": { + "type": "Measurement", + "raw": [ + 4, + 4, + 4, + 4, + 4, + 4 + ], + "unit": "us" + } + }, + "NeonSomeMock2Workload_Execute_#6": { + "type": "Event", + "Wall clock time_#6": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Start)_#6": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Stop)_#6": { + "type": "Measurement", + "raw": [ + 4, + 4, + 4, + 4, + 4, + 4 + ], + "unit": "us" + } + }, + "ClSomeMock3dWorkload_Execute_#7": { + "type": "Event", + "Wall clock time_#7": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Start)_#7": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Stop)_#7": { + "type": "Measurement", + "raw": [ + 4, + 4, + 4, + 4, + 4, + 4 + ], + "unit": "us" + } + }, + "EthosNSomeMock4dWorkload_Execute_#8": { + "type": "Event", + "Wall clock time_#8": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Start)_#8": { + "type": "Measurement", + "raw": [ + 2, + 2, + 2, + 2, + 2, + 2 + ], + "unit": "us" + }, + "Wall clock time (Stop)_#8": { + "type": "Measurement", + "raw": [ + 4, + 4, + 4, + 4, + 4, + 4 + ], + "unit": "us" + } + } + } + } + } +} diff --git a/python/pyarmnn/test/testdata/shared/onnx_parser/golden_output_onnx.npy b/python/pyarmnn/test/testdata/shared/onnx_parser/golden_output_onnx.npy new file mode 100644 index 0000000000..f83d6ea7cb Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/onnx_parser/golden_output_onnx.npy differ diff --git a/python/pyarmnn/test/testdata/shared/onnx_parser/input_onnx.npy b/python/pyarmnn/test/testdata/shared/onnx_parser/input_onnx.npy new file mode 100644 index 0000000000..15df758b58 Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/onnx_parser/input_onnx.npy differ diff --git a/python/pyarmnn/test/testdata/shared/tf_parser/golden_output_tf.npy b/python/pyarmnn/test/testdata/shared/tf_parser/golden_output_tf.npy new file mode 100644 index 0000000000..007141cb9f Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/tf_parser/golden_output_tf.npy differ diff --git a/python/pyarmnn/test/testdata/shared/tf_parser/input_tf.npy b/python/pyarmnn/test/testdata/shared/tf_parser/input_tf.npy new file mode 100644 index 0000000000..a21802e4b8 Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/tf_parser/input_tf.npy differ diff --git a/python/pyarmnn/test/testdata/shared/tflite_parser/golden_output_lite.npy b/python/pyarmnn/test/testdata/shared/tflite_parser/golden_output_lite.npy new file mode 100644 index 0000000000..099f7fed22 Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/tflite_parser/golden_output_lite.npy differ diff --git a/python/pyarmnn/test/testdata/shared/tflite_parser/input_lite.npy b/python/pyarmnn/test/testdata/shared/tflite_parser/input_lite.npy new file mode 100644 index 0000000000..53174683ff Binary files /dev/null and b/python/pyarmnn/test/testdata/shared/tflite_parser/input_lite.npy differ -- cgit v1.2.1