Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
Details
Activity
Cycle Analytics
Repository
Repository
Files
Commits
Branches
Tags
Contributors
Graph
Compare
Charts
Issues
0
Issues
0
List
Board
Labels
Milestones
Merge Requests
0
Merge Requests
0
CI / CD
CI / CD
Pipelines
Jobs
Schedules
Charts
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
d7b88f4c
Commit
d7b88f4c
authored
Oct 10, 2018
by
Wei Chen
Committed by
Tianqi Chen
Oct 10, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add instructions to run tests locally (#1868)
parent
6616355d
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
48 additions
and
0 deletions
+48
-0
docs/contribute/pull_request.rst
+48
-0
No files found.
docs/contribute/pull_request.rst
View file @
d7b88f4c
...
...
@@ -24,3 +24,50 @@ This is a quick guide to submit a pull request, please also refer to the detaile
- The detailed guidelines and summarizes useful lessons.
- The patch can be merged after the reviewers approve the pull request.
Testing
-------
Even though we have hooks to run unit tests automatically for each pull request, It's always recommended to run unit tests
locally beforehand to reduce reviewers' burden and speedup review process.
C++
^^^
.. code:: bash
# assume you are in tvm source root
TVM_ROOT=`pwd`
# you need to install google test first, gtest will be installed to $TVM_ROOT/lib
CACHE_PREFIX=. make -f 3rdparty/dmlc-core/scripts/packages.mk gtest
mkdir build
cd build
GTEST_LIB=$TVM_ROOT/lib cmake ..
make cpptest -j
for test in *_test; do
./$test || exit -1
done
Python
^^^^^^
If you want to run all tests:
.. code:: bash
# build tvm
make
./tests/scripts/task_python_unittest.sh
If you want to run a single test:
.. code:: bash
# build tvm
make
# let python know where to find tvm related libraries
export PYTHONPATH=python:topi/python
rm -rf python/tvm/*.pyc python/tvm/*/*.pyc python/tvm/*/*/*.pyc
TVM_FFI=ctypes python -m nose -v tests/python/unittest/test_pass_storage_rewrite.py
\ No newline at end of file
Write
Preview
Markdown
is supported
0%
Try again
or
attach a new file
Attach a file
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Cancel
Please
register
or
sign in
to comment