Skip to content
GitLab
Explore
Sign in
Primary navigation
Search or go to…
Project
T
tvm
Manage
Activity
Members
Labels
Plan
Issues
Issue boards
Milestones
Wiki
Code
Merge requests
Repository
Branches
Commits
Tags
Repository graph
Compare revisions
Snippets
Build
Pipelines
Jobs
Pipeline schedules
Artifacts
Deploy
Releases
Model registry
Operate
Environments
Monitor
Incidents
Service Desk
Analyze
Value stream analytics
Contributor analytics
CI/CD analytics
Repository analytics
Model experiments
Help
Help
Support
GitLab documentation
Compare GitLab plans
Community forum
Contribute to GitLab
Provide feedback
Terms and privacy
Keyboard shortcuts
?
Snippets
Groups
Projects
Show more breadcrumbs
cld
ml
tvm
Commits
d7b88f4c
Commit
d7b88f4c
authored
6 years ago
by
Wei Chen
Committed by
Tianqi Chen
6 years ago
Browse files
Options
Downloads
Patches
Plain Diff
Add instructions to run tests locally (#1868)
parent
6616355d
No related branches found
Branches containing commit
No related tags found
Tags containing commit
No related merge requests found
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
docs/contribute/pull_request.rst
+47
-0
47 additions, 0 deletions
docs/contribute/pull_request.rst
with
47 additions
and
0 deletions
docs/contribute/pull_request.rst
+
47
−
0
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
This diff is collapsed.
Click to expand it.
Preview
0%
Loading
Try again
or
attach a new file
.
Cancel
You are about to add
0
people
to the discussion. Proceed with caution.
Finish editing this message first!
Save comment
Cancel
Please
register
or
sign in
to comment