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
c6c287bf
Commit
c6c287bf
authored
Sep 04, 2017
by
Tianqi Chen
Committed by
GitHub
Sep 04, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[SETUP] Always use relpath for setup (#421)
* [SETUP] Always use relpath for setup * [CMAKE] Fix cmake llvm build
parent
3c9e262f
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
8 additions
and
3 deletions
+8
-3
CMakeLists.txt
+4
-1
python/setup.py
+3
-1
src/codegen/llvm/codegen_llvm.cc
+1
-1
No files found.
CMakeLists.txt
View file @
c6c287bf
...
@@ -129,7 +129,10 @@ if(USE_LLVM)
...
@@ -129,7 +129,10 @@ if(USE_LLVM)
message
(
STATUS
"Build with LLVM support..."
)
message
(
STATUS
"Build with LLVM support..."
)
include_directories
(
${
LLVM_INCLUDE_DIRS
}
)
include_directories
(
${
LLVM_INCLUDE_DIRS
}
)
add_definitions
(
${
LLVM_DEFINITIONS
}
)
add_definitions
(
${
LLVM_DEFINITIONS
}
)
add_definitions
(
-DTVM_LLVM_VERSION=
${
LLVM_PACKAGE_VERSION
}
)
string
(
REPLACE
"."
""
TVM_LLVM_VERSION
${
LLVM_PACKAGE_VERSION
}
)
string
(
SUBSTRING
${
TVM_LLVM_VERSION
}
0 2 TVM_LLVM_VERSION
)
message
(
STATUS
"TVM_LLVM_VERSION="
${
TVM_LLVM_VERSION
}
)
add_definitions
(
-DTVM_LLVM_VERSION=
${
TVM_LLVM_VERSION
}
)
llvm_map_components_to_libnames
(
LLVM_LIBS all
)
llvm_map_components_to_libnames
(
LLVM_LIBS all
)
list
(
REMOVE_ITEM LLVM_LIBS LTO
)
list
(
REMOVE_ITEM LLVM_LIBS LTO
)
list
(
APPEND TVM_LINKER_LIBS
${
LLVM_LIBS
}
)
list
(
APPEND TVM_LINKER_LIBS
${
LLVM_LIBS
}
)
...
...
python/setup.py
View file @
c6c287bf
...
@@ -88,9 +88,11 @@ if "bdist_wheel" in sys.argv:
...
@@ -88,9 +88,11 @@ if "bdist_wheel" in sys.argv:
"include_package_data"
:
True
"include_package_data"
:
True
}
}
else
:
else
:
curr_path
=
os
.
path
.
dirname
(
os
.
path
.
abspath
(
os
.
path
.
expanduser
(
__file__
)))
rpath
=
os
.
path
.
relpath
(
LIB_PATH
[
0
],
curr_path
)
setup_kwargs
=
{
setup_kwargs
=
{
"include_package_data"
:
True
,
"include_package_data"
:
True
,
"data_files"
:
[(
'tvm'
,
[
LIB_PATH
[
0
]
])]
"data_files"
:
[(
'tvm'
,
[
rpath
])]
}
}
setup
(
name
=
'tvm'
,
setup
(
name
=
'tvm'
,
...
...
src/codegen/llvm/codegen_llvm.cc
View file @
c6c287bf
...
@@ -1151,7 +1151,7 @@ void CodeGenLLVM::VisitStmt_(const AssertStmt* op) {
...
@@ -1151,7 +1151,7 @@ void CodeGenLLVM::VisitStmt_(const AssertStmt* op) {
// TODO(tqchen) move these pattern to a generic scope info visitor.
// TODO(tqchen) move these pattern to a generic scope info visitor.
if
(
const
EQ
*
eq
=
op
->
condition
.
as
<
EQ
>
())
{
if
(
const
EQ
*
eq
=
op
->
condition
.
as
<
EQ
>
())
{
const
Mod
*
mod
=
eq
->
a
.
as
<
Mod
>
();
const
Mod
*
mod
=
eq
->
a
.
as
<
Mod
>
();
int64_t
factor
,
offset
;
int64_t
factor
=
0
,
offset
=
0
;
if
(
mod
&&
arith
::
GetConst
(
eq
->
b
,
&
offset
))
{
if
(
mod
&&
arith
::
GetConst
(
eq
->
b
,
&
offset
))
{
const
Variable
*
var
=
mod
->
a
.
as
<
Variable
>
();
const
Variable
*
var
=
mod
->
a
.
as
<
Variable
>
();
if
(
var
&&
arith
::
GetConst
(
mod
->
b
,
&
factor
))
{
if
(
var
&&
arith
::
GetConst
(
mod
->
b
,
&
factor
))
{
...
...
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