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
fed6298b
Commit
fed6298b
authored
Jun 13, 2018
by
Tianqi Chen
Committed by
GitHub
Jun 13, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[BUILD] Add clang to build matrix, -Werror (#1273)
parent
a81ebd90
Show whitespace changes
Inline
Side-by-side
Showing
10 changed files
with
35 additions
and
22 deletions
+35
-22
CMakeLists.txt
+2
-2
Jenkinsfile
+9
-1
README.md
+5
-5
nnvm/src/core/symbolic.cc
+1
-1
src/contrib/sort/sort.cc
+6
-4
src/runtime/opengl/opengl_device_api.cc
+3
-2
src/runtime/opengl/opengl_module.h
+4
-2
tests/ci_build/Dockerfile.gpu
+2
-2
tests/ci_build/install/ubuntu_install_llvm.sh
+1
-1
topi/include/topi/reduction.h
+2
-2
No files found.
CMakeLists.txt
View file @
fed6298b
...
@@ -82,8 +82,8 @@ if(MSVC)
...
@@ -82,8 +82,8 @@ if(MSVC)
else
(
MSVC
)
else
(
MSVC
)
include
(
CheckCXXCompilerFlag
)
include
(
CheckCXXCompilerFlag
)
check_cxx_compiler_flag
(
"-std=c++11"
SUPPORT_CXX11
)
check_cxx_compiler_flag
(
"-std=c++11"
SUPPORT_CXX11
)
set
(
CMAKE_C_FLAGS
"-O
3 -Wall -fPIC
"
)
set
(
CMAKE_C_FLAGS
"-O
2 -Wall -fPIC
${
CMAKE_C_FLAGS
}
"
)
set
(
CMAKE_CXX_FLAGS
"
${
CMAKE_C_FLAGS
}
-std=c++11
"
)
set
(
CMAKE_CXX_FLAGS
"
-O2 -Wall -fPIC -std=c++11
${
CMAKE_CXX_FLAGS
}
"
)
endif
(
MSVC
)
endif
(
MSVC
)
# add source group
# add source group
...
...
Jenkinsfile
View file @
fed6298b
...
@@ -96,6 +96,8 @@ stage('Build') {
...
@@ -96,6 +96,8 @@ stage('Build') {
echo set\\(USE_SORT ON\\) >> config.cmake
echo set\\(USE_SORT ON\\) >> config.cmake
echo set\\(USE_GRAPH_RUNTIME ON\\) >> config.cmake
echo set\\(USE_GRAPH_RUNTIME ON\\) >> config.cmake
echo set\\(USE_BLAS openblas\\) >> config.cmake
echo set\\(USE_BLAS openblas\\) >> config.cmake
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
"""
make
(
'gpu'
,
'build'
,
'-j2'
)
make
(
'gpu'
,
'build'
,
'-j2'
)
pack_lib
(
'gpu'
,
tvm_multilib
)
pack_lib
(
'gpu'
,
tvm_multilib
)
...
@@ -106,7 +108,9 @@ stage('Build') {
...
@@ -106,7 +108,9 @@ stage('Build') {
cp ../cmake/config.cmake .
cp ../cmake/config.cmake .
echo set\\(USE_OPENCL ON\\) >> config.cmake
echo set\\(USE_OPENCL ON\\) >> config.cmake
echo set\\(USE_ROCM ON\\) >> config.cmake
echo set\\(USE_ROCM ON\\) >> config.cmake
echo set\\(USE_VULKAN OFF\\) >> config.cmake
echo set\\(USE_VULKAN ON\\) >> config.cmake
echo set\\(CMAKE_CXX_COMPILER clang-6.0\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
"""
make
(
'gpu'
,
'build2'
,
'-j2'
)
make
(
'gpu'
,
'build2'
,
'-j2'
)
}
}
...
@@ -122,6 +126,8 @@ stage('Build') {
...
@@ -122,6 +126,8 @@ stage('Build') {
cp ../cmake/config.cmake .
cp ../cmake/config.cmake .
echo set\\(USE_SORT ON\\) >> config.cmake
echo set\\(USE_SORT ON\\) >> config.cmake
echo set\\(USE_LLVM llvm-config-4.0\\) >> config.cmake
echo set\\(USE_LLVM llvm-config-4.0\\) >> config.cmake
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
"""
make
(
'cpu'
,
'build'
,
'-j2'
)
make
(
'cpu'
,
'build'
,
'-j2'
)
pack_lib
(
'cpu'
,
tvm_lib
)
pack_lib
(
'cpu'
,
tvm_lib
)
...
@@ -142,6 +148,8 @@ stage('Build') {
...
@@ -142,6 +148,8 @@ stage('Build') {
echo set\\(USE_SORT ON\\) >> config.cmake
echo set\\(USE_SORT ON\\) >> config.cmake
echo set\\(USE_RPC ON\\) >> config.cmake
echo set\\(USE_RPC ON\\) >> config.cmake
echo set\\(USE_LLVM llvm-config-5.0\\) >> config.cmake
echo set\\(USE_LLVM llvm-config-5.0\\) >> config.cmake
echo set\\(CMAKE_CXX_COMPILER g++\\) >> config.cmake
echo set\\(CMAKE_CXX_FLAGS -Werror\\) >> config.cmake
"""
"""
make
(
'i386'
,
'build'
,
'-j2'
)
make
(
'i386'
,
'build'
,
'-j2'
)
pack_lib
(
'i386'
,
tvm_multilib
)
pack_lib
(
'i386'
,
tvm_multilib
)
...
...
README.md
View file @
fed6298b
<img src=https://raw.githubusercontent.com/tqchen/tvm.ai/master/images/logo/tvm-logo-small.png width=128/> Open Deep Learning Compiler Stack
<img src=https://raw.githubusercontent.com/tqchen/tvm.ai/master/images/logo/tvm-logo-small.png width=128/> Open Deep Learning Compiler Stack
==============================================
==============================================
[
![GitHub license
](
http://dmlc.github.io/img/apache2.svg
)
](./LICENSE)
[
![GitHub license
](
http
s
://dmlc.github.io/img/apache2.svg
)
](./LICENSE)
[
![Build Status
](
http://mode-gpu.cs.washington.edu:8080/buildStatus/icon?job=dmlc/tvm/master
)
](http://mode-gpu.cs.washington.edu:8080/job/dmlc/job/tvm/job/master/)
[
![Build Status
](
http://mode-gpu.cs.washington.edu:8080/buildStatus/icon?job=dmlc/tvm/master
)
](http://mode-gpu.cs.washington.edu:8080/job/dmlc/job/tvm/job/master/)
[
Documentation
](
http://docs.tvm.ai
)
|
[
Documentation
](
http
s
://docs.tvm.ai
)
|
[
Contributors
](
CONTRIBUTORS.md
)
|
[
Contributors
](
CONTRIBUTORS.md
)
|
[
Community
](
http://tvm.ai/community.html
)
|
[
Community
](
http
s
://tvm.ai/community.html
)
|
[
Release Notes
](
NEWS.md
)
[
Release Notes
](
NEWS.md
)
TVM is a compiler stack for deep learning systems. It is designed to close the gap between the
TVM is a compiler stack for deep learning systems. It is designed to close the gap between the
productivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends.
productivity-focused deep learning frameworks, and the performance- and efficiency-focused hardware backends.
TVM works with deep learning frameworks to provide end to end compilation to different backends.
TVM works with deep learning frameworks to provide end to end compilation to different backends.
Checkout the
[
tvm stack homepage
](
http://tvm.ai/
)
for more information.
Checkout the
[
tvm stack homepage
](
http
s
://tvm.ai/
)
for more information.
License
License
-------
-------
...
@@ -21,7 +21,7 @@ License
...
@@ -21,7 +21,7 @@ License
Contribute to TVM
Contribute to TVM
-----------------
-----------------
TVM adopts apache committer model, we aim to create an open source project that is maintained and owned by the community.
TVM adopts apache committer model, we aim to create an open source project that is maintained and owned by the community.
Checkout the
[
Contributor Guide
](
http://docs.tvm.ai/contribute/
)
Checkout the
[
Contributor Guide
](
http
s
://docs.tvm.ai/contribute/
)
Acknowledgement
Acknowledgement
---------------
---------------
...
...
nnvm/src/core/symbolic.cc
View file @
fed6298b
...
@@ -200,7 +200,7 @@ std::vector<NodePtr> Symbol::ListInputs(ListInputOption option) const {
...
@@ -200,7 +200,7 @@ std::vector<NodePtr> Symbol::ListInputs(ListInputOption option) const {
std
::
vector
<
NodePtr
>
vlist
;
std
::
vector
<
NodePtr
>
vlist
;
vlist
.
reserve
(
this
->
outputs
.
size
());
vlist
.
reserve
(
this
->
outputs
.
size
());
static
auto
&
fmutate_inputs
=
Op
::
GetAttr
<
FMutateInputs
>
(
"FMutateInputs"
);
static
auto
&
fmutate_inputs
=
Op
::
GetAttr
<
FMutateInputs
>
(
"FMutateInputs"
);
DFSVisit
(
this
->
outputs
,
[
&
ret
,
&
mutable_set
,
&
vlist
](
const
NodePtr
&
node
)
{
DFSVisit
(
this
->
outputs
,
[
&
mutable_set
,
&
vlist
](
const
NodePtr
&
node
)
{
if
(
node
->
is_variable
())
{
if
(
node
->
is_variable
())
{
vlist
.
push_back
(
node
);
vlist
.
push_back
(
node
);
}
else
if
(
fmutate_inputs
.
count
(
node
->
op
()))
{
}
else
if
(
fmutate_inputs
.
count
(
node
->
op
()))
{
...
...
src/contrib/sort/sort.cc
View file @
fed6298b
...
@@ -78,12 +78,14 @@ TVM_REGISTER_GLOBAL("tvm.contrib.sort.argsort")
...
@@ -78,12 +78,14 @@ TVM_REGISTER_GLOBAL("tvm.contrib.sort.argsort")
int64_t
full_idx
=
base_idx
+
k
*
axis_mul_after
;
int64_t
full_idx
=
base_idx
+
k
*
axis_mul_after
;
sorter
.
emplace_back
(
std
::
make_pair
(
k
,
*
(
data_ptr
+
full_idx
)));
sorter
.
emplace_back
(
std
::
make_pair
(
k
,
*
(
data_ptr
+
full_idx
)));
}
}
std
::
stable_sort
(
sorter
.
begin
(),
sorter
.
end
(),
if
(
is_descend
)
{
is_descend
?
CompareDescend
<
float
>
std
::
stable_sort
(
sorter
.
begin
(),
sorter
.
end
(),
CompareDescend
<
float
>
);
:
CompareAscend
<
float
>
);
}
else
{
std
::
stable_sort
(
sorter
.
begin
(),
sorter
.
end
(),
CompareAscend
<
float
>
);
}
for
(
int32_t
k
=
0
;
k
<
input
->
shape
[
axis
];
++
k
)
{
for
(
int32_t
k
=
0
;
k
<
input
->
shape
[
axis
];
++
k
)
{
*
(
static_cast
<
int32_t
*>
(
output
->
data
)
+
base_idx
+
k
*
axis_mul_after
)
*
(
static_cast
<
int32_t
*>
(
output
->
data
)
+
base_idx
+
k
*
axis_mul_after
)
=
k
<
sorter
.
size
(
)
?
sorter
[
k
].
first
:
k
;
=
k
<
static_cast
<
int32_t
>
(
sorter
.
size
()
)
?
sorter
[
k
].
first
:
k
;
}
}
}
}
}
}
...
...
src/runtime/opengl/opengl_device_api.cc
View file @
fed6298b
...
@@ -328,10 +328,11 @@ static TextureFormat GetTextureFormat(TVMType type) {
...
@@ -328,10 +328,11 @@ static TextureFormat GetTextureFormat(TVMType type) {
LOG
(
FATAL
)
<<
"Unsupported type bits "
<<
type
.
bits
;
LOG
(
FATAL
)
<<
"Unsupported type bits "
<<
type
.
bits
;
}
}
}
}
default
:
default
:
{
LOG
(
FATAL
)
<<
"Unsupported type code"
<<
type
.
code
;
LOG
(
FATAL
)
<<
"Unsupported type code"
<<
type
.
code
;
}
}
assert
(
false
);
}
return
{
GL_R32F
,
GL_RED
,
GL_FLOAT
};
}
}
Texture
OpenGLWorkspace
::
CreateTexture
(
TVMType
type
,
size_t
nbytes
)
{
Texture
OpenGLWorkspace
::
CreateTexture
(
TVMType
type
,
size_t
nbytes
)
{
...
...
src/runtime/opengl/opengl_module.h
View file @
fed6298b
...
@@ -88,8 +88,10 @@ inline std::string OpenGLArgKind2String(OpenGLArgKind kind) {
...
@@ -88,8 +88,10 @@ inline std::string OpenGLArgKind2String(OpenGLArgKind kind) {
return
"input_texture"
;
return
"input_texture"
;
case
OpenGLArgKind
:
:
kUniform
:
case
OpenGLArgKind
:
:
kUniform
:
return
"uniform"
;
return
"uniform"
;
default
:
LOG
(
FATAL
)
<<
"invalid arg kind"
;
return
""
;
}
}
assert
(
false
);
}
}
inline
OpenGLArgKind
String2OpenGLArgKind
(
const
std
::
string
&
str
)
{
inline
OpenGLArgKind
String2OpenGLArgKind
(
const
std
::
string
&
str
)
{
...
@@ -101,7 +103,7 @@ inline OpenGLArgKind String2OpenGLArgKind(const std::string& str) {
...
@@ -101,7 +103,7 @@ inline OpenGLArgKind String2OpenGLArgKind(const std::string& str) {
return
OpenGLArgKind
::
kUniform
;
return
OpenGLArgKind
::
kUniform
;
}
else
{
}
else
{
LOG
(
FATAL
)
<<
"Invalid OpenGL arg kind."
;
LOG
(
FATAL
)
<<
"Invalid OpenGL arg kind."
;
assert
(
false
)
;
return
OpenGLArgKind
::
kUniform
;
}
}
}
}
...
...
tests/ci_build/Dockerfile.gpu
View file @
fed6298b
...
@@ -60,8 +60,8 @@ RUN bash /install/ubuntu_install_onnx.sh
...
@@ -60,8 +60,8 @@ RUN bash /install/ubuntu_install_onnx.sh
RUN pip3 install Pillow
RUN pip3 install Pillow
# disable vulkan for now
# disable vulkan for now
#
COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh
COPY install/ubuntu_install_vulkan.sh /install/ubuntu_install_vulkan.sh
#
RUN bash /install/ubuntu_install_vulkan.sh
RUN bash /install/ubuntu_install_vulkan.sh
# Environment variables
# Environment variables
ENV PATH=/usr/local/nvidia/bin:${PATH}
ENV PATH=/usr/local/nvidia/bin:${PATH}
...
...
tests/ci_build/install/ubuntu_install_llvm.sh
View file @
fed6298b
...
@@ -19,4 +19,4 @@ echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\
...
@@ -19,4 +19,4 @@ echo deb-src http://apt.llvm.org/xenial/ llvm-toolchain-xenial main\
>>
/etc/apt/sources.list.d/llvm.list
>>
/etc/apt/sources.list.d/llvm.list
wget
-O
- http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
wget
-O
- http://apt.llvm.org/llvm-snapshot.gpg.key|sudo apt-key add -
apt-get update
&&
apt-get install
-y
--force-yes
llvm-4.0 llvm-5.0 llvm-6.0
apt-get update
&&
apt-get install
-y
--force-yes
llvm-4.0 llvm-5.0 llvm-6.0
clang-6.0
topi/include/topi/reduction.h
View file @
fed6298b
...
@@ -238,8 +238,8 @@ inline FCommReduce MakeCommReducer(FCombine fcombine,
...
@@ -238,8 +238,8 @@ inline FCommReduce MakeCommReducer(FCombine fcombine,
for
(
size_t
i
=
0
;
i
<
exprs
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
exprs
.
size
();
++
i
)
{
auto
dtype
=
exprs
[
i
].
type
();
auto
dtype
=
exprs
[
i
].
type
();
dtypes
.
push_back
(
dtype
);
dtypes
.
push_back
(
dtype
);
lhs
.
push_back
(
var
(
"
lhs_"
+
std
::
to_string
(
i
),
dtype
));
lhs
.
push_back
(
var
(
name
+
"_
lhs_"
+
std
::
to_string
(
i
),
dtype
));
rhs
.
push_back
(
var
(
"
rhs_"
+
std
::
to_string
(
i
),
dtype
));
rhs
.
push_back
(
var
(
name
+
"_
rhs_"
+
std
::
to_string
(
i
),
dtype
));
}
}
auto
result
=
fcombine
(
lhs
,
rhs
);
auto
result
=
fcombine
(
lhs
,
rhs
);
...
...
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