From ffdd51e727859ae51163c7847e887db8d403dc06 Mon Sep 17 00:00:00 2001 From: Donghyeon Jeong Date: Fri, 26 Jul 2024 16:53:32 +0900 Subject: [PATCH] [Doc] NNTrainer Tool Utilization Guide This PR adds a guide for executing unit tests on the Android device. **Self-evaluation:** 1. Build test: [X]Passed [ ]Failed [ ]Skipped 2. Run test: [X]Passed [ ]Failed [ ]Skipped Signed-off-by: Donghyeon Jeong --- tools/README.md | 34 ++++++++++++++++++++++++++++++++++ 1 file changed, 34 insertions(+) create mode 100644 tools/README.md diff --git a/tools/README.md b/tools/README.md new file mode 100644 index 0000000000..da4937a236 --- /dev/null +++ b/tools/README.md @@ -0,0 +1,34 @@ +# Tools + +This section explains how to utilize the NNTrainer tools. + +## Running Unit Tests on Android Devices + +Here we will guide you through running unit tests on an Android device. + +#### Preparing for Android Testing + +Prerequisite: Install and configure the NDK + +``` +$ ./tools/android_test.sh +``` + +#### Generating Layer Golden Data + +``` +$ meson build [flags...] +$ cd build +$ adb push res/ /data/local/tmp/nntr_android_test +``` + +Please note that golden data is necessary to execute layer-related tests. + +#### Executing Unit Tests on the Android Device + +``` +$ adb shell +$ cd /data/local/tmp/nntr_android_test/ +$ export LD_LIBRARY_PATH=. +$ ./unittest_nntrainer_tensor +```