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
1229e2d0
Commit
1229e2d0
authored
Mar 29, 2018
by
Tianqi Chen
Committed by
GitHub
Mar 29, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[PASS] More reliable error message for lower warp (#1065)
parent
18db02a1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
15 additions
and
8 deletions
+15
-8
src/pass/lower_warp_memory.cc
+15
-8
No files found.
src/pass/lower_warp_memory.cc
View file @
1229e2d0
...
...
@@ -94,9 +94,13 @@ class WarpStoreCoeffFinder : private IRVisitor {
CHECK_EQ
(
m
.
size
(),
2U
)
<<
"LowerWarpMemory failed due to store index="
<<
index
;
int
coeff
;
CHECK
(
arith
::
GetConstInt
(
ir
::
Simplify
(
m
[
0
]),
&
coeff
)
&&
coeff
>
0
)
Expr
mcoeff
=
ir
::
Simplify
(
m
[
0
]);
CHECK
(
arith
::
GetConstInt
(
mcoeff
,
&
coeff
)
&&
coeff
>
0
)
<<
"LowerWarpMemory failed due to store index="
<<
index
<<
", require positive constant coefficient on warp index"
;
<<
", require positive constant coefficient on warp index "
<<
warp_index_
<<
" but get "
<<
mcoeff
;
if
(
warp_coeff_
!=
0
)
{
CHECK_EQ
(
warp_coeff_
,
coeff
)
<<
"LowerWarpMemory failed due to two different store coefficient to warp index"
;
...
...
@@ -129,11 +133,6 @@ class WarpIndexFinder : private IRVisitor {
}
private
:
void
Visit
(
const
NodeRef
&
node
)
final
{
if
(
warp_index_
.
defined
())
return
;
IRVisitor
::
Visit
(
node
);
}
/// Visitor implementation
void
Visit_
(
const
AttrStmt
*
op
)
final
{
if
(
op
->
attr_key
==
attr
::
thread_extent
)
{
...
...
@@ -145,7 +144,15 @@ class WarpIndexFinder : private IRVisitor {
<<
"Expect threadIdx.x 's size to be equal to warp size("
<<
warp_size_
<<
")"
<<
" to enable warp memory"
<<
" but get "
<<
op
->
value
<<
" instead"
;
warp_index_
=
iv
;
if
(
warp_index_
.
defined
())
{
CHECK
(
warp_index_
.
same_as
(
iv
))
<<
"Find two instance of "
<<
warp_index_
->
thread_tag
<<
" in the same kernel. "
<<
"Please create it using thread_axis once and reuse the axis "
<<
"across multiple binds in the same kernel"
;
}
else
{
warp_index_
=
iv
;
}
}
}
IRVisitor
::
Visit_
(
op
);
...
...
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