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
c3b569d2
Commit
c3b569d2
authored
Oct 21, 2018
by
Changming Sun
Committed by
Tianqi Chen
Oct 21, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
up (#1940)
parent
02a8be10
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
2 deletions
+4
-2
src/pass/inject_virtual_thread.cc
+2
-1
src/pass/vectorize_loop.cc
+2
-1
No files found.
src/pass/inject_virtual_thread.cc
View file @
c3b569d2
...
@@ -430,7 +430,8 @@ class VTInjector : public IRMutator {
...
@@ -430,7 +430,8 @@ class VTInjector : public IRMutator {
}
else
{
}
else
{
// insert a for loop
// insert a for loop
Var
idx
(
var_
->
name_hint
+
".s"
,
var_
->
type
);
Var
idx
(
var_
->
name_hint
+
".s"
,
var_
->
type
);
stmt
=
Substitute
(
stmt
,
{{
var_
,
idx
}});
Map
<
Var
,
Expr
>
values
{{
var_
,
idx
}};
stmt
=
Substitute
(
stmt
,
values
);
return
For
::
make
(
idx
,
make_zero
(
idx
.
type
()),
return
For
::
make
(
idx
,
make_zero
(
idx
.
type
()),
make_const
(
idx
.
type
(),
num_threads_
),
make_const
(
idx
.
type
(),
num_threads_
),
ForType
::
Serial
,
DeviceAPI
::
None
,
stmt
);
ForType
::
Serial
,
DeviceAPI
::
None
,
stmt
);
...
...
src/pass/vectorize_loop.cc
View file @
c3b569d2
...
@@ -355,7 +355,8 @@ class Vectorizer : public IRMutator {
...
@@ -355,7 +355,8 @@ class Vectorizer : public IRMutator {
// scalarize the statment
// scalarize the statment
Stmt
Scalarize
(
Stmt
stmt
)
{
Stmt
Scalarize
(
Stmt
stmt
)
{
Var
idx
(
var_
->
name_hint
+
".s"
,
var_
->
type
);
Var
idx
(
var_
->
name_hint
+
".s"
,
var_
->
type
);
stmt
=
Substitute
(
stmt
,
{{
var_
,
idx
}});
Map
<
Var
,
Expr
>
values
{{
var_
,
idx
}};
stmt
=
Substitute
(
stmt
,
values
);
return
For
::
make
(
idx
,
0
,
var_lanes_
,
ForType
::
Serial
,
DeviceAPI
::
None
,
stmt
);
return
For
::
make
(
idx
,
0
,
var_lanes_
,
ForType
::
Serial
,
DeviceAPI
::
None
,
stmt
);
}
}
...
...
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