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
05952984
Commit
05952984
authored
Jan 31, 2018
by
Thierry Moreau
Committed by
Tianqi Chen
Jan 31, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
copy intrinsic now can include typecast (#855)
parent
bf71582c
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
1 deletions
+6
-1
src/pass/inject_copy_intrin.cc
+6
-1
No files found.
src/pass/inject_copy_intrin.cc
View file @
05952984
...
...
@@ -51,12 +51,17 @@ class CopyIntrinInjector : public IRMutator {
const
Store
*
store
=
body
.
as
<
Store
>
();
if
(
store
==
nullptr
)
return
false
;
const
Select
*
select
=
store
->
value
.
as
<
Select
>
();
const
Cast
*
cast
=
store
->
value
.
as
<
Cast
>
();
const
Load
*
load
=
store
->
value
.
as
<
Load
>
();
// for now only support true condition matching
if
(
select
!=
nullptr
)
{
load
=
select
->
true_value
.
as
<
Load
>
();
}
// cast can be part of the pattern
if
(
cast
!=
nullptr
)
{
load
=
cast
->
value
.
as
<
Load
>
();
}
if
(
load
==
nullptr
)
return
false
;
if
(
load
->
type
.
lanes
()
!=
1
)
return
false
;
Array
<
Var
>
loop_vars
;
...
...
@@ -114,7 +119,7 @@ class CopyIntrinInjector : public IRMutator {
Array
<
Expr
>
dst_strides
(
store_strides
.
begin
(),
store_strides
.
begin
()
+
loop_vars
.
size
());
Buffer
dst
=
BufferNode
::
make
(
Var
(
store
->
buffer_var
.
node_
),
load
->
type
,
store
->
value
.
type
()
,
dst_shape
,
dst_strides
,
store_strides
[
loop_vars
.
size
()],
...
...
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