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
770b904b
Commit
770b904b
authored
Dec 13, 2017
by
Salem Derisavi
Committed by
Tianqi Chen
Dec 14, 2017
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Simplify expressions early on (#702)
* Simplify expressions early on * fixed lint errors
parent
33910970
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
6 additions
and
1 deletions
+6
-1
src/arithmetic/int_set.cc
+1
-1
src/schedule/bound.cc
+5
-0
No files found.
src/arithmetic/int_set.cc
View file @
770b904b
...
@@ -27,7 +27,7 @@ inline IntSet IntSet::cover_interval() const {
...
@@ -27,7 +27,7 @@ inline IntSet IntSet::cover_interval() const {
for
(
size_t
i
=
0
;
i
<
s
->
extents
.
size
();
++
i
)
{
for
(
size_t
i
=
0
;
i
<
s
->
extents
.
size
();
++
i
)
{
max
=
max
+
s
->
extents
[
i
]
*
s
->
strides
[
i
]
-
s
->
strides
[
i
];
max
=
max
+
s
->
extents
[
i
]
*
s
->
strides
[
i
]
-
s
->
strides
[
i
];
}
}
return
IntervalSet
::
make
(
s
->
base
.
min
,
max
);
return
IntervalSet
::
make
(
s
->
base
.
min
,
Simplify
(
max
)
);
}
}
LOG
(
FATAL
)
<<
"cannot convert set "
<<
(
*
this
)
->
type_key
()
<<
" to interval"
;
LOG
(
FATAL
)
<<
"cannot convert set "
<<
(
*
this
)
->
type_key
()
<<
" to interval"
;
return
IntSet
::
everything
();
return
IntSet
::
everything
();
...
...
src/schedule/bound.cc
View file @
770b904b
...
@@ -6,6 +6,7 @@
...
@@ -6,6 +6,7 @@
#include <tvm/ir_visitor.h>
#include <tvm/ir_visitor.h>
#include <tvm/schedule_pass.h>
#include <tvm/schedule_pass.h>
#include <tvm/operation.h>
#include <tvm/operation.h>
#include <tvm/ir_pass.h>
#include <unordered_map>
#include <unordered_map>
#include <unordered_set>
#include <unordered_set>
#include "./graph.h"
#include "./graph.h"
...
@@ -209,6 +210,10 @@ Map<IterVar, Range> InferBound(const Schedule& sch) {
...
@@ -209,6 +210,10 @@ Map<IterVar, Range> InferBound(const Schedule& sch) {
ret
[
iv
]
=
iv
->
dom
;
ret
[
iv
]
=
iv
->
dom
;
}
}
}
}
for
(
auto
&
p
:
ret
)
{
ret
[
p
.
first
]
=
Range
::
make_by_min_extent
(
ir
::
Simplify
(
p
.
second
->
min
),
ir
::
Simplify
(
p
.
second
->
extent
));
}
return
Map
<
IterVar
,
Range
>
(
ret
.
begin
(),
ret
.
end
());
return
Map
<
IterVar
,
Range
>
(
ret
.
begin
(),
ret
.
end
());
}
}
...
...
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