Skip to content
Projects
Groups
Snippets
Help
Loading...
Sign in / Register
Toggle navigation
N
ngraph
Project
Project
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
Packages
Packages
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
submodule
ngraph
Commits
d0b97e73
Commit
d0b97e73
authored
Aug 01, 2019
by
Diego Caballero
Committed by
Scott Cyphers
Aug 01, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[MLIR] Fix issue with non-affine loads/stores in argmin/armax/gather ops (#3351)
parent
9f928d92
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
8 additions
and
4 deletions
+8
-4
lowerer.cpp
src/contrib/mlir/lowerer.cpp
+8
-4
No files found.
src/contrib/mlir/lowerer.cpp
View file @
d0b97e73
...
...
@@ -43,6 +43,8 @@ namespace
using
namespace
mlir
::
edsc
::
op
;
using
namespace
ngraph
::
runtime
;
using
namespace
ngraph
::
runtime
::
ngmlir
;
// Index notation to generate standard (i.e., non-affine) loads and stores.
using
StdIndexedValue
=
TemplatedIndexedValue
<
intrinsics
::
std_load
,
intrinsics
::
std_store
>
;
class
DialectLoweringPass
;
...
...
@@ -682,7 +684,8 @@ namespace
// Create view to write into result.
MemRefView
vRes
(
result
),
vParams
(
params
),
vIndices
(
indices
);
// Indexed Values
IndexedValue
iRes
(
result
),
iParams
(
params
),
iIndices
(
indices
);
IndexedValue
iRes
(
result
),
iIndices
(
indices
);
StdIndexedValue
iParams
(
params
);
// Construct outer loop for params dims. Exclude the axis dim.
SmallVector
<
ValueHandle
,
4
>
paramsLbs
,
paramsUbs
;
...
...
@@ -894,7 +897,8 @@ namespace
// Views
MemRefView
vRes
(
result
),
vArg
(
arg
);
// Index Values
IndexedValue
iRes
(
result
),
iArg
(
arg
);
StdIndexedValue
iRes
(
result
),
stdArg
(
arg
);
IndexedValue
affineArg
(
arg
);
// Bounds Index Handles
auto
resLbs
=
vRes
.
getLbs
();
auto
resUbs
=
vRes
.
getUbs
();
...
...
@@ -944,9 +948,9 @@ namespace
ValueHandle
newRedIdx
=
std
::
is_same
<
RedOp
,
NGArgMinRedOp
>
()
?
edsc
::
intrinsics
::
select
(
iArg
(
allIVs
)
<
i
Arg
(
tempIVs
),
allIVs
[
axis
],
currRedIdx
)
affineArg
(
allIVs
)
<
std
Arg
(
tempIVs
),
allIVs
[
axis
],
currRedIdx
)
:
edsc
::
intrinsics
::
select
(
iArg
(
tempIVs
)
<
i
Arg
(
allIVs
),
allIVs
[
axis
],
currRedIdx
);
stdArg
(
tempIVs
)
<
affine
Arg
(
allIVs
),
allIVs
[
axis
],
currRedIdx
);
iRes
(
nonRedIVs
)
=
ValueHandle
::
create
<
IndexCastOp
>
(
newRedIdx
,
resTy
);
});
...
...
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