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
a3073457
Commit
a3073457
authored
Sep 17, 2019
by
Junru Shao
Committed by
Tianqi Chen
Sep 17, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
More friendly error msg; Fix Android Demo LLVM ver (#3962)
parent
3edf5260
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
3 deletions
+19
-3
CMakeLists.txt
+1
-1
cmake/util/FindLLVM.cmake
+16
-0
docker/Dockerfile.demo_android
+1
-1
tutorials/frontend/deploy_model_on_android.py
+1
-1
No files found.
CMakeLists.txt
View file @
a3073457
...
@@ -101,7 +101,7 @@ else(MSVC)
...
@@ -101,7 +101,7 @@ else(MSVC)
set
(
CMAKE_C_FLAGS
"-O2 -Wall -fPIC
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_C_FLAGS
"-O2 -Wall -fPIC
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-O2 -Wall -fPIC
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-O2 -Wall -fPIC
${
CMAKE_CXX_FLAGS
}
"
)
if
(
HIDE_PRIVATE_SYMBOLS
)
if
(
HIDE_PRIVATE_SYMBOLS
)
message
(
"Hide private symbols..."
)
message
(
STATUS
"Hide private symbols..."
)
set
(
CMAKE_C_FLAGS
"-fvisibility=hidden
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_C_FLAGS
"-fvisibility=hidden
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-fvisibility=hidden
${
CMAKE_CXX_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"-fvisibility=hidden
${
CMAKE_CXX_FLAGS
}
"
)
endif
(
HIDE_PRIVATE_SYMBOLS
)
endif
(
HIDE_PRIVATE_SYMBOLS
)
...
...
cmake/util/FindLLVM.cmake
View file @
a3073457
...
@@ -49,13 +49,29 @@ macro(find_llvm use_llvm)
...
@@ -49,13 +49,29 @@ macro(find_llvm use_llvm)
message
(
STATUS
"Use llvm-config="
${
LLVM_CONFIG
}
)
message
(
STATUS
"Use llvm-config="
${
LLVM_CONFIG
}
)
separate_arguments
(
LLVM_CONFIG
)
separate_arguments
(
LLVM_CONFIG
)
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--libfiles
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--libfiles
RESULT_VARIABLE __llvm_exit_code
OUTPUT_VARIABLE __llvm_libfiles
)
OUTPUT_VARIABLE __llvm_libfiles
)
if
(
NOT
"
${
__llvm_exit_code
}
"
STREQUAL
"0"
)
message
(
FATAL_ERROR
"Fatal error executing:
${
use_llvm
}
--libfiles"
)
endif
()
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--system-libs
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--system-libs
RESULT_VARIABLE __llvm_exit_code
OUTPUT_VARIABLE __llvm_system_libs
)
OUTPUT_VARIABLE __llvm_system_libs
)
if
(
NOT
"
${
__llvm_exit_code
}
"
STREQUAL
"0"
)
message
(
FATAL_ERROR
"Fatal error executing:
${
use_llvm
}
--system-libs"
)
endif
()
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--cxxflags
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--cxxflags
RESULT_VARIABLE __llvm_exit_code
OUTPUT_VARIABLE __llvm_cxxflags
)
OUTPUT_VARIABLE __llvm_cxxflags
)
if
(
NOT
"
${
__llvm_exit_code
}
"
STREQUAL
"0"
)
message
(
FATAL_ERROR
"Fatal error executing:
${
use_llvm
}
--cxxflags"
)
endif
()
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--version
execute_process
(
COMMAND
${
LLVM_CONFIG
}
--version
RESULT_VARIABLE __llvm_exit_code
OUTPUT_VARIABLE __llvm_version
)
OUTPUT_VARIABLE __llvm_version
)
if
(
NOT
"
${
__llvm_exit_code
}
"
STREQUAL
"0"
)
message
(
FATAL_ERROR
"Fatal error executing:
${
use_llvm
}
--version"
)
endif
()
# llvm version
# llvm version
string
(
REGEX REPLACE
"^([^.]+)\.([^.])+\.[^.]+.*$"
"
\\
1
\\
2"
TVM_LLVM_VERSION
${
__llvm_version
}
)
string
(
REGEX REPLACE
"^([^.]+)\.([^.])+\.[^.]+.*$"
"
\\
1
\\
2"
TVM_LLVM_VERSION
${
__llvm_version
}
)
# definitions
# definitions
...
...
docker/Dockerfile.demo_android
View file @
a3073457
...
@@ -61,7 +61,7 @@ RUN cd /usr && \
...
@@ -61,7 +61,7 @@ RUN cd /usr && \
mkdir -p build && \
mkdir -p build && \
cd build && \
cd build && \
cmake \
cmake \
-DUSE_LLVM=llvm-config-
6.0
\
-DUSE_LLVM=llvm-config-
8
\
-DUSE_RPC=ON \
-DUSE_RPC=ON \
-DUSE_SORT=ON \
-DUSE_SORT=ON \
-DUSE_GRAPH_RUNTIME=ON \
-DUSE_GRAPH_RUNTIME=ON \
...
...
tutorials/frontend/deploy_model_on_android.py
View file @
a3073457
...
@@ -66,7 +66,7 @@ from tvm.contrib.download import download_testdata
...
@@ -66,7 +66,7 @@ from tvm.contrib.download import download_testdata
#
#
# mkdir build
# mkdir build
# cd build
# cd build
# cmake -DUSE_LLVM=llvm-config-
6.0
\
# cmake -DUSE_LLVM=llvm-config-
8
\
# -DUSE_RPC=ON \
# -DUSE_RPC=ON \
# -DUSE_SORT=ON \
# -DUSE_SORT=ON \
# -DUSE_VULKAN=ON \
# -DUSE_VULKAN=ON \
...
...
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