Commit 21ece752 by Tianqi Chen Committed by GitHub

[DOCS] Improve review guide, improve cmake llvm build (#1295)

parent 0702d2c0
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.
......@@ -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
......@@ -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)
......@@ -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.
......@@ -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.
......@@ -17,6 +17,7 @@ API Reference
.. toctree::
:maxdepth: 2
langref/index
api/python/index
api_links
......
Language Reference
==================
This document provide references to
embedded languages in TVM stack.
TOPI: TVM Operator Inventory
\ No newline at end of file
TOPI: TVM Operator Inventory
----------------------------
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment