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
0bddb26d
Commit
0bddb26d
authored
Aug 08, 2018
by
Jaikrishnan Menon
Committed by
Scott Cyphers
Aug 08, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Make pool alignment a constexpr (#1369)
* Make pool alignment a constexpr * Fix ODR-use
parent
19bdb2ff
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
3 additions
and
6 deletions
+3
-6
cpu_external_function.cpp
src/ngraph/runtime/cpu/cpu_external_function.cpp
+2
-5
cpu_external_function.hpp
src/ngraph/runtime/cpu/cpu_external_function.hpp
+1
-1
No files found.
src/ngraph/runtime/cpu/cpu_external_function.cpp
View file @
0bddb26d
...
...
@@ -322,9 +322,6 @@ static const runtime::cpu::OpMap dispatcher{
{
TI
(
ngraph
::
op
::
LRN
),
&
runtime
::
cpu
::
CPU_Emitter
::
emit
<
ngraph
::
op
::
LRN
>
},
};
const
size_t
runtime
::
cpu
::
CPU_ExternalFunction
::
CPU_ExternalFunction
::
s_memory_pool_alignment
=
4096
;
runtime
::
cpu
::
CPU_ExternalFunction
::
CPU_ExternalFunction
(
const
shared_ptr
<
ngraph
::
Function
>&
function
,
bool
release_function
)
:
m_function
(
function
)
...
...
@@ -384,7 +381,7 @@ void runtime::cpu::CPU_ExternalFunction::compile()
pass_manager
.
register_pass
<
ngraph
::
pass
::
CommonFunctionCollection
>
(
femitter
,
node_function_map
,
common_function_string
);
pass_manager
.
register_pass
<
ngraph
::
pass
::
Liveness
>
();
pass_manager
.
register_pass
<
ngraph
::
pass
::
MemoryLayout
>
(
s
_memory_pool_alignment
,
true
);
pass_manager
.
register_pass
<
ngraph
::
pass
::
MemoryLayout
>
(
s
ize_t
(
s_memory_pool_alignment
)
,
true
);
pass_manager
.
run_passes
(
m_function
);
unordered_map
<
shared_ptr
<
Function
>
,
list
<
shared_ptr
<
Node
>>>
function_ordered_ops
;
...
...
@@ -1084,7 +1081,7 @@ void runtime::cpu::CPU_ExternalFunction::build()
pass_manager
.
register_pass
<
ngraph
::
pass
::
ResultCopyElimination
>
();
pass_manager
.
register_pass
<
ngraph
::
pass
::
GetOutputElementElimination
>
();
pass_manager
.
register_pass
<
ngraph
::
pass
::
Liveness
>
();
pass_manager
.
register_pass
<
ngraph
::
pass
::
MemoryLayout
>
(
s
_memory_pool_alignment
,
true
);
pass_manager
.
register_pass
<
ngraph
::
pass
::
MemoryLayout
>
(
s
ize_t
(
s_memory_pool_alignment
)
,
true
);
pass_manager
.
run_passes
(
m_function
,
false
);
// Store layouts assigned for arguments
...
...
src/ngraph/runtime/cpu/cpu_external_function.hpp
View file @
0bddb26d
...
...
@@ -94,7 +94,7 @@ namespace ngraph
const
std
::
string
&
get_function_name
()
const
{
return
m_function_name
;
}
const
std
::
shared_ptr
<
ngraph
::
Function
>
get_function
()
{
return
m_function
;
}
// Temporary Memory Pool alignment
static
const
size_t
s_memory_pool_alignment
;
static
const
expr
size_t
s_memory_pool_alignment
=
4096
;
std
::
list
<
std
::
function
<
void
(
CPURuntimeContext
*
)
>>&
get_functors
()
{
...
...
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