Skip to content

Commit

Permalink
[DOCS] Improve review guide, improve cmake llvm build (#1295)
Browse files Browse the repository at this point in the history
  • Loading branch information
tqchen authored Jun 17, 2018
1 parent df4a629 commit d3a7df9
Show file tree
Hide file tree
Showing 7 changed files with 31 additions and 8 deletions.
File renamed without changes.
2 changes: 1 addition & 1 deletion .github/PULL_REQUEST_TEMPLATE.md
Original file line number Diff line number Diff line change
@@ -1 +1 @@
Thanks for contributing to TVM! Please refer to guideline http://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from others in the community.
Thanks for contributing to TVM! Please refer to guideline https://docs.tvm.ai/contribute/ for useful information and tips. After the pull request is submitted, please request code reviews from others in the community.
13 changes: 10 additions & 3 deletions cmake/util/FindLLVM.cmake
Original file line number Diff line number Diff line change
Expand Up @@ -23,8 +23,6 @@ macro(find_llvm use_llvm)
elseif(NOT LLVM_CONFIG STREQUAL "OFF")
# use llvm config
message(STATUS "Use llvm-config=" ${LLVM_CONFIG})
execute_process(COMMAND ${LLVM_CONFIG} --includedir
OUTPUT_VARIABLE LLVM_INCLUDE_DIRS)
execute_process(COMMAND ${LLVM_CONFIG} --libfiles
OUTPUT_VARIABLE __llvm_libfiles)
execute_process(COMMAND ${LLVM_CONFIG} --system-libs
Expand All @@ -34,12 +32,21 @@ macro(find_llvm use_llvm)
execute_process(COMMAND ${LLVM_CONFIG} --version
COMMAND cut -b 1,3
OUTPUT_VARIABLE TVM_LLVM_VERSION)
# definitions
string(REGEX MATCHALL "(^| )-D[A-Za-z0-9_]*" LLVM_DEFINITIONS ${__llvm_cxxflags})
# include dir
string(REGEX MATCHALL "(^| )-I[A-Za-z0-9_/.\-]*" __llvm_include_flags ${__llvm_cxxflags})
set(LLVM_INCLUDE_DIRS "")
foreach(__flag IN ITEMS ${__llvm_include_flags})
string(REGEX REPLACE "(^| )-I" "" __dir "${__flag}")
list(APPEND LLVM_INCLUDE_DIRS "${__dir}")
endforeach()
message(STATUS ${LLVM_INCLUDE_DIRS})
# libfiles
string(STRIP ${__llvm_libfiles} __llvm_libfiles)
string(STRIP ${__llvm_system_libs} __llvm_system_libs)
set(LLVM_LIBS "${__llvm_libfiles} ${__llvm_system_libs}")
separate_arguments(LLVM_LIBS)
string(STRIP ${LLVM_INCLUDE_DIRS} LLVM_INCLUDE_DIRS)
string(STRIP ${TVM_LLVM_VERSION} TVM_LLVM_VERSION)
endif()
endmacro(find_llvm)
16 changes: 13 additions & 3 deletions docs/contribute/code_review.rst
Original file line number Diff line number Diff line change
Expand Up @@ -7,6 +7,7 @@ Open source code is maintained by a community with diverse backend, and it is ev

Here are some checklists for code reviews, it is also helpful reference for contributors


Hold the Highest Standard
-------------------------
The first rule for code reviewers is to always keep the highest standard, and do not approve code just to "be friendly". Good, informative critics each other learn and prevents technical debt in early stages.
Expand Down Expand Up @@ -46,8 +47,17 @@ Respect each other
------------------
The code reviewers and contributors are paying the most precious currencies in the world -- time. We are volunteers in the community to spend the time to build good code, help each other, learn and have fun hacking.

Approve Changes
---------------
Learn from other Code Reviews
-----------------------------
There can be multiple reviewers reviewing the same changes. Many cases other reviewers
may spot things you did not find. Try to learn from other code reviews,
when possible, document these lessons.

Approve and Request Changes Explicitly
--------------------------------------
The contributor and code owner can request code reviews from multiple reviewers.
Code owner can decide if the code can be merged in case by case if some of the reviewers did not respond in time(e.g. a week) and existing reviews are sufficient.
Remember to approve changes when your comments are addressed in a code review.
To do so -- please click on changes tab in the pull request, then select approve,
or comment on the code and click request changes.
Code owner can decide if the code can be merged in case by case if some of the reviewers
did not respond in time(e.g. a week) and existing reviews are sufficient.
1 change: 1 addition & 0 deletions docs/index.rst
Original file line number Diff line number Diff line change
Expand Up @@ -17,6 +17,7 @@ API Reference
.. toctree::
:maxdepth: 2

langref/index
api/python/index
api_links

Expand Down
4 changes: 4 additions & 0 deletions docs/langref/index.rst
Original file line number Diff line number Diff line change
@@ -0,0 +1,4 @@
Language Reference
==================
This document provide references to
embedded languages in TVM stack.
3 changes: 2 additions & 1 deletion tutorials/topi/README.txt
Original file line number Diff line number Diff line change
@@ -1 +1,2 @@
TOPI: TVM Operator Inventory
TOPI: TVM Operator Inventory
----------------------------

0 comments on commit d3a7df9

Please sign in to comment.