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
862aa5fe
Unverified
Commit
862aa5fe
authored
Jul 29, 2019
by
Robert Kimball
Committed by
GitHub
Jul 29, 2019
Browse files
Options
Browse Files
Download
Plain Diff
Merge pull request #3325 from NervanaSystems/nmostafa/mergefix
[MLIR] Fix bad merge on 2 MLIR changes
parents
fc9a7dea
c4dfca3b
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
5 additions
and
5 deletions
+5
-5
lowerer.cpp
src/contrib/mlir/lowerer.cpp
+5
-5
No files found.
src/contrib/mlir/lowerer.cpp
View file @
862aa5fe
...
...
@@ -137,9 +137,9 @@ namespace
private
:
NGraphTypeConverter
typeConverter
;
// Value holding mem manager passed pointer
SmallVector
<
Value
*
,
4
>
m
_m
emMgrDefs
;
SmallVector
<
Value
*
,
4
>
memMgrDefs
;
// List of temporary memrefs to deallocate at end of function
SmallVector
<
Value
*
,
4
>
m
_m
emRefsToDealloc
;
SmallVector
<
Value
*
,
4
>
memRefsToDealloc
;
// list of results values to add to func signature
SmallVector
<
Value
*
,
4
>
loweredOutputValues
;
ngmlir
::
MLIRCompiler
&
compiler
;
...
...
@@ -264,7 +264,7 @@ namespace
NGRAPH_CHECK
(
memRefType
.
hasStaticShape
(),
"Dynamic shapes are not supported"
);
Value
*
alloc
=
rewriter
.
create
<
mlir
::
AllocOp
>
(
rewriter
.
getUnknownLoc
(),
memRefType
);
m
_m
emRefsToDealloc
.
push_back
(
alloc
);
memRefsToDealloc
.
push_back
(
alloc
);
// TODO:
// Enable dynamic memref allocation via call-back to nGraph allocator
...
...
@@ -342,7 +342,7 @@ namespace
void
DialectLoweringPass
::
insertDeallocs
(
PatternRewriter
&
rewriter
)
{
for
(
auto
value
:
m
_m
emRefsToDealloc
)
for
(
auto
value
:
memRefsToDealloc
)
{
rewriter
.
create
<
DeallocOp
>
(
rewriter
.
getUnknownLoc
(),
value
);
}
...
...
@@ -777,7 +777,7 @@ namespace
REWRITER
(
NGReturnOp
)
{
m_
pass
.
insertDeallocs
(
rewriter
);
pass
.
insertDeallocs
(
rewriter
);
rewriter
.
replaceOpWithNewOp
<
ReturnOp
>
(
op
);
return
matchSuccess
();
}
...
...
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