marcoabreu closed pull request #13334: Add documentation about reproducing test 
results on ARM (Raspberry PI etc)
URL: https://github.com/apache/incubator-mxnet/pull/13334
 
 
   

This is a PR merged from a forked repository.
As GitHub hides the original diff on merge, it is displayed below for
the sake of provenance:

As this is a foreign pull request (from a fork), the diff is supplied
below (as it won't show otherwise due to GitHub magic):

diff --git a/ci/README.md b/ci/README.md
index 5b6cc668978..e11c140d4c4 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 e53fe18a7f9..6791a6ebd4b 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.


 

----------------------------------------------------------------
This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
 
For queries about this service, please contact Infrastructure at:
[email protected]


With regards,
Apache Git Services

Reply via email to