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
11b612ca
Commit
11b612ca
authored
Nov 05, 2017
by
Jaikrishnan Menon
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
CPU: clang-format fixes and header cleanup for generated code
parent
fc50420f
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
19 additions
and
17 deletions
+19
-17
cpu_kernels.hpp
src/ngraph/runtime/cpu/cpu_kernels.hpp
+6
-3
emitter.cpp
src/ngraph/runtime/cpu/emitter.cpp
+0
-0
external_function.cpp
src/ngraph/runtime/cpu/external_function.cpp
+7
-8
external_function.hpp
src/ngraph/runtime/cpu/external_function.hpp
+6
-6
No files found.
src/ngraph/runtime/cpu/cpu_kernels.hpp
View file @
11b612ca
...
...
@@ -92,9 +92,12 @@ namespace mkl
extern
"C"
{
void
MKL_Somatcopy
(
char
ordering
,
char
trans
,
size_t
rows
,
size_t
cols
,
size_t
rows
,
size_t
cols
,
const
ngraph
::
element
::
Float32
::
type
alpha
,
const
ngraph
::
element
::
Float32
::
type
*
A
,
size_t
lda
,
ngraph
::
element
::
Float32
::
type
*
B
,
size_t
ldb
);
const
ngraph
::
element
::
Float32
::
type
*
A
,
size_t
lda
,
ngraph
::
element
::
Float32
::
type
*
B
,
size_t
ldb
);
}
}
src/ngraph/runtime/cpu/emitter.cpp
View file @
11b612ca
This diff is collapsed.
Click to expand it.
src/ngraph/runtime/cpu/external_function.cpp
View file @
11b612ca
...
...
@@ -208,19 +208,18 @@ void ExternalFunction::compile(FunctionMap& function_map)
Emitter
emitter
;
auto
&
TU
=
emitter
.
GetTU
();
TU
+=
R"(// Generated by the NGraph CPU backend
#include <memory>
#include <vector>
#include <algorithm>
#include <cmath>
#include <memory>
#include <vector>
#include <Eigen/Dense>
#include "ngraph/descriptor/layout/dense_tensor_view_layout.hpp"
#include "ngraph/runtime/tensor_view_info.hpp"
#include "ngraph/runtime/utils.hpp"
#include "ngraph/runtime/cpu/call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_kernels.hpp"
#include "ngraph/runtime/cpu/eigen_utils.hpp"
#include "ngraph/runtime/utils.hpp"
using namespace ngraph::element;
using namespace ngraph::runtime;
...
...
@@ -281,10 +280,10 @@ extern "C" void __entrypoint(ngraph::runtime::cpu::CallFrame* call_frame,
assert
(
llvm_module
);
estate
.
add_module
(
llvm_module
);
estate
.
finalize
();
compiled_function
=
estate
.
find_function
<
void
(
ngraph
::
runtime
::
cpu
::
CallFrame
*
,
ngraph
::
runtime
::
TensorViewPtrs
&
,
const
std
::
vector
<
std
::
shared_ptr
<
CallFrame
>>&
)
>
(
"__entrypoint"
);
compiled_function
=
estate
.
find_function
<
void
(
ngraph
::
runtime
::
cpu
::
CallFrame
*
,
ngraph
::
runtime
::
TensorViewPtrs
&
,
const
std
::
vector
<
std
::
shared_ptr
<
CallFrame
>>&
)
>
(
"__entrypoint"
);
assert
(
compiled_function
);
m_is_compiled
=
true
;
...
...
src/ngraph/runtime/cpu/external_function.hpp
View file @
11b612ca
...
...
@@ -20,8 +20,8 @@
#include <typeinfo>
#include <unordered_map>
#include "ngraph/function.hpp"
#include "ngraph/codegen/compiler.hpp"
#include "ngraph/function.hpp"
#include "ngraph/runtime/external_function.hpp"
#include "ngraph/runtime/tensor_view_info.hpp"
...
...
@@ -47,9 +47,10 @@ namespace ngraph
using
OpMap
=
std
::
unordered_map
<
std
::
type_index
,
OpFunction
>
;
using
EntryPoint
=
std
::
function
<
void
(
ngraph
::
runtime
::
cpu
::
CallFrame
*
,
ngraph
::
runtime
::
TensorViewPtrs
&
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
cpu
::
CallFrame
>>&
)
>
;
using
EntryPoint
=
std
::
function
<
void
(
ngraph
::
runtime
::
cpu
::
CallFrame
*
,
ngraph
::
runtime
::
TensorViewPtrs
&
,
const
std
::
vector
<
std
::
shared_ptr
<
ngraph
::
runtime
::
cpu
::
CallFrame
>>&
)
>
;
class
ExternalFunction
:
public
ngraph
::
runtime
::
ExternalFunction
{
...
...
@@ -57,8 +58,7 @@ namespace ngraph
ExternalFunction
(
const
std
::
shared_ptr
<
ngraph
::
Function
>&
function
,
bool
release_function
=
true
);
std
::
shared_ptr
<
ngraph
::
runtime
::
CallFrame
>
make_call_frame
();
std
::
vector
<
std
::
shared_ptr
<
CallFrame
>>
&
get_callees
()
{
return
callees
;
}
std
::
vector
<
std
::
shared_ptr
<
CallFrame
>>&
get_callees
()
{
return
callees
;
}
protected
:
void
compile
(
FunctionMap
&
function_map
);
...
...
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