tree: c501b9afb0f833d2dd53925cd0af894efd15fc49 [path history] [tgz]
  1. .gitignore
  2. CMakeLists.txt
  4. cpp/
  5. jenkins/
  6. nightly/
  7. python-pytest/
  8. python/
  9. requirements.txt
  10. tutorials/
  11. utils/

Testing MXNET

Running CPP Tests

  1. Install cmake

  2. Create a build directory in the root of the mxnet project

    mkdir build
    cd build
  3. Generate your Makefile and build along with the tests with cmake (specify appropraite flags)

  4. Run tests

    ctest --verbose
  5. The following will run all the tests the in cpp directory. To run just your test file replace the following in your tests/CMakeLists.txt

    file(GLOB_RECURSE UNIT_TEST_SOURCE "cpp/*.cc" "cpp/*.h")



Building with Ninja

Ninja is a build tool (like make) that prioritizes building speed. If you will be building frequently, we recommend you use ninja

  1. Download Ninja via package manager or directly from source
    apt-get install ninja-build
  2. When running cmake, add the -GNinja flag to specify cmake to generate a Ninja build file
  3. Run the ninja build file with

Runing Python Tests Within Docker

  1. To run tests inside docker run the following comamdn
    ci/ --platform {PLATFORM} /work/ {RUNTIME_FUNCTION}

An example for running python tests would be

ci/ --platform build_ubuntu_cpu_mkldnn /work/ unittest_ubuntu_python3_cpu PYTHONPATH=./python/ nosetests-2.7 tests/python/unittest