-
Notifications
You must be signed in to change notification settings - Fork 3.5k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[BUILD][DOCS] Migrate VTA CI, test, build, docs
- Loading branch information
Showing
80 changed files
with
334 additions
and
4,526 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,5 @@ | ||
#!/bin/bash | ||
PROJROOT="$( cd "$( dirname "${BASH_SOURCE[0]}" )/../../" && pwd )" | ||
|
||
export PYTHONPATH=${PYTHONPATH}:${PROJROOT}/python:${PROJROOT}/vta/python | ||
python -m vta.exec.rpc_server |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,51 @@ | ||
# CMake Build rules for VTA | ||
find_program(PYTHON python) | ||
|
||
if(MSVC) | ||
message(STATUS "VTA build is skipped in Windows..") | ||
elseif(PYTHON) | ||
set(VTA_CONFIG ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/vta/config/vta_config.py) | ||
|
||
if(EXISTS ${CMAKE_CURRENT_BINARY_DIR}/vta_config.json) | ||
message(STATUS "Use VTA config " ${CMAKE_CURRENT_BINARY_DIR}/vta_config.json) | ||
set(VTA_CONFIG ${PYTHON} ${CMAKE_CURRENT_SOURCE_DIR}/vta/config/vta_config.py | ||
--use-cfg=${CMAKE_CURRENT_BINARY_DIR}/vta_config.json) | ||
endif() | ||
|
||
execute_process(COMMAND ${VTA_CONFIG} --target OUTPUT_VARIABLE __vta_target) | ||
string(STRIP ${__vta_target} VTA_TARGET) | ||
|
||
message(STATUS "Build VTA runtime with target: " ${VTA_TARGET}) | ||
|
||
execute_process(COMMAND ${VTA_CONFIG} --defs OUTPUT_VARIABLE __vta_defs) | ||
|
||
string(REGEX MATCHALL "(^| )-D[A-Za-z0-9_=.]*" VTA_DEFINITIONS "${__vta_defs}") | ||
|
||
file(GLOB VTA_RUNTIME_SRCS vta/src/*.cc) | ||
file(GLOB __vta_target_srcs vta/src/${VTA_TARGET}/*.cc) | ||
list(APPEND VTA_RUNTIME_SRCS ${__vta_target_srcs}) | ||
|
||
add_library(vta SHARED ${VTA_RUNTIME_SRCS}) | ||
|
||
target_include_directories(vta PUBLIC vta/include) | ||
|
||
foreach(__def ${VTA_DEFINITIONS}) | ||
string(SUBSTRING ${__def} 3 -1 __strip_def) | ||
target_compile_definitions(vta PUBLIC ${__strip_def}) | ||
endforeach() | ||
|
||
if(APPLE) | ||
set_target_properties(vta PROPERTIES LINK_FLAGS "-undefined dynamic_lookup") | ||
endif(APPLE) | ||
|
||
# PYNQ rules | ||
if(${VTA_TARGET} STREQUAL "pynq") | ||
find_library(__sds_lib NAMES sds_lib PATHS /usr/lib) | ||
find_library(__dma_lib NAMES dma PATHS | ||
"/opt/python3.6/lib/python3.6/site-packages/pynq/drivers/" | ||
"/opt/python3.6/lib/python3.6/site-packages/pynq/lib/") | ||
target_link_libraries(vta ${__sds_lib} ${__dma_lib}) | ||
endif() | ||
else() | ||
message(STATUS "Cannot found python in env, VTA build is skipped..") | ||
endif() |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,6 +1,28 @@ | ||
The documentation of tvm is generated with recommonmark and sphinx. | ||
TVM Documentations | ||
================== | ||
This folder contains the source of TVM documents | ||
|
||
- A hosted version of doc is at http://docs.tvm.ai | ||
- pip install sphinx>=1.5.5 sphinx-gallery sphinx_rtd_theme matplotlib Image recommonmark | ||
- pip install sphinx>=1.5.5 sphinx-gallery sphinx_rtd_theme matplotlib Image recommonmark Pillow | ||
- Build tvm first in the root folder. | ||
- To build locally, you need to enable USE_CUDA, USE_OPENCL, LLVM_CONFIG in config.mk and then type "make html" in this folder. | ||
|
||
Only Execute Specified Tutorials | ||
-------------------------------- | ||
The document build process will execute all the tutorials in the sphinx gallery. | ||
This will cause failure in some cases when certain machines do not have necessary | ||
environment. You can set ```TVM_TUTORIAL_EXEC_PATTERN``` to only execute | ||
the path that matches the regular expression pattern. | ||
|
||
For example, to only build tutorials under /vta/tutorials, run | ||
|
||
```bash | ||
TVM_TUTORIAL_EXEC_PATTERN=/vta/tutorials make html | ||
``` | ||
|
||
To only build one specific file, do | ||
|
||
```bash | ||
# The slash \ is used to get . in regular expression | ||
TVM_TUTORIAL_EXEC_PATTERN=file_name\.py make html | ||
``` |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -20,5 +20,6 @@ Python API | |
contrib | ||
dev | ||
topi | ||
vta/index | ||
nnvm/index | ||
hybrid |
4 changes: 2 additions & 2 deletions
4
vta/docs/api/python/index.rst → docs/api/python/vta/index.rst
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -1,5 +1,5 @@ | ||
Python API | ||
========== | ||
VTA API | ||
======= | ||
|
||
This document contains the python API to VTA compiler toolchain. | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,6 +8,7 @@ Get Started | |
|
||
install/index | ||
tutorials/index | ||
vta/index | ||
deploy/index | ||
contribute/index | ||
faq | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1 @@ | ||
tutorials |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,2 @@ | ||
VTA Hardware Design Overview | ||
============================ |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,23 @@ | ||
VTA: Deep Learning Accelerator Stack | ||
==================================== | ||
Specialized accelerators are key enablers of future deep learning workloads. TVM stack targets specialized accelerators. | ||
VTA(versatile tensor accelerator) is a generic, modular open-source deep learning accelerator. | ||
This page contains links to all the resources related to VTA: | ||
|
||
.. toctree:: | ||
:maxdepth: 1 | ||
|
||
install | ||
tutorials/index | ||
hardware | ||
|
||
|
||
Features | ||
-------- | ||
VTA have the following key features: | ||
|
||
- Generic, modular open-source hardware | ||
- Streamlined workflow to deploy to FPGAs. | ||
- Simulator support to protoype compilation passes on regular workstations. | ||
- Driver and JIT runtime for both simulated and FPGA hardware backend. | ||
- End to end TVM stack integration |
Oops, something went wrong.