You are viewing a plain text version of this content. The canonical link for it is here.
Posted to commits@mxnet.apache.org by ma...@apache.org on 2018/11/21 11:28:52 UTC
[incubator-mxnet] branch master updated: Add documentation about
reproducing test results on ARM (#13334)
This is an automated email from the ASF dual-hosted git repository.
marcoabreu pushed a commit to branch master
in repository https://gitbox.apache.org/repos/asf/incubator-mxnet.git
The following commit(s) were added to refs/heads/master by this push:
new 578c547 Add documentation about reproducing test results on ARM (#13334)
578c547 is described below
commit 578c547072ecce63ad48fa7946172d8b4b0e2bab
Author: Pedro Larroy <92...@users.noreply.github.com>
AuthorDate: Wed Nov 21 12:28:38 2018 +0100
Add documentation about reproducing test results on ARM (#13334)
---
ci/README.md | 68 ++++++++++++++++++++++++++++++++++++++++++++++++---
docs/install/index.md | 3 +++
2 files changed, 68 insertions(+), 3 deletions(-)
diff --git a/ci/README.md b/ci/README.md
index 5b6cc66..e11c140 100644
--- a/ci/README.md
+++ b/ci/README.md
@@ -88,9 +88,9 @@ source 3rdparty folder of the parent mxnet sources concurrent builds of
different platforms is NOT SUPPORTED.
## ccache
-For all builds a directory from the host system is mapped where ccache will store cached
-compiled object files (defaults to /tmp/ci_ccache). This will speed up rebuilds
-significantly. You can set this directory explicitly by setting CCACHE_DIR environment
+For all builds a directory from the host system is mapped where ccache will store cached
+compiled object files (defaults to /tmp/ci_ccache). This will speed up rebuilds
+significantly. You can set this directory explicitly by setting CCACHE_DIR environment
variable. All ccache instances are currently set to be 10 Gigabytes max in size.
@@ -117,4 +117,66 @@ ssh -o StrictHostKeyChecking=no -p 2222 qemu@localhost
There are two pre-configured users: `root` and `qemu` both without passwords.
+### Example of reproducing a test result with QEMU on ARM
+
+You might want to enable a debug build first:
+
+```
+$ git diff
+diff --git a/ci/docker/runtime_functions.sh b/ci/docker/runtime_functions.sh
+index 39631f9..666ceea 100755
+--- a/ci/docker/runtime_functions.sh
++++ b/ci/docker/runtime_functions.sh
+@@ -172,6 +172,7 @@ build_armv7() {
+ -DUSE_LAPACK=OFF \
+ -DBUILD_CPP_EXAMPLES=OFF \
+ -Dmxnet_LINKER_LIBS=-lgfortran \
++ -DCMAKE_BUILD_TYPE=Debug \
+ -G Ninja /work/mxnet
+
+ ninja -v
+
+```
+
+Then we build the project for armv7, the test container and start QEMU inside docker:
+
+```
+ci/build.py -p armv7
+ci/build.py -p test.arm_qemu -b && docker run -p2222:2222 -ti mxnetci/build.test.arm_qemu
+```
+
+
+
+At this point we copy artifacts and sources to the VM, in another terminal (host) do the following:
+
+```
+# Copy mxnet sources to the VM
+rsync --delete -e 'ssh -p2222' --exclude='.git/' -zvaP ./ qemu@localhost:mxnet
+
+
+# Ssh into the vm
+ssh -p2222 qemu@localhost
+
+cd mxnet
+
+# Execute a single failing C++ test
+build/tests/mxnet_unit_tests --gtest_filter="ACTIVATION_PERF.ExecuteBidirectional"
+
+# To install MXNet:
+sudo pip3 install --upgrade --force-reinstall build/mxnet-1.3.1-py2.py3-none-any.whl
+
+# Execute a single python test:
+
+nosetests-3.4 -v -s tests/python/unittest/test_ndarray.py
+
+
+# Debug with cgdb
+
+cgdb build/tests/mxnet_unit_tests
+
+(gdb) !pwd
+/home/qemu/mxnet
+(gdb) set substitute-path /work /home/qemu
+(gdb) r --gtest_filter="ACTIVATION_PERF.ExecuteBidirectional"
+```
diff --git a/docs/install/index.md b/docs/install/index.md
index e53fe18..6791a6e 100644
--- a/docs/install/index.md
+++ b/docs/install/index.md
@@ -1033,6 +1033,9 @@ Follow the four steps in this [docker documentation](https://docs.docker.com/eng
## Build
+**Please use a Native build with gcc 4 as explained below, higher compiler versions currently cause test
+failures on ARM**
+
The following command will build a container with dependencies and tools and then compile MXNet for
ARMv7. The resulting artifact will be located in `build/mxnet-x.x.x-py2.py3-none-any.whl`, copy this
file to your Raspberry Pi.