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
a5476da6
Commit
a5476da6
authored
Mar 09, 2018
by
Louis Feng
Browse files
Options
Browse Files
Download
Plain Diff
Merge branch 'master' into louisfeng/NGMX-296-conv_bias
parents
362bb996
0acaea58
Expand all
Show whitespace changes
Inline
Side-by-side
Showing
6 changed files
with
40 additions
and
46 deletions
+40
-46
mkldnn_emitter.cpp
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
+6
-0
mkldnn_emitter.hpp
src/ngraph/runtime/cpu/mkldnn_emitter.hpp
+2
-0
gpu_emitter.cpp
src/ngraph/runtime/gpu/gpu_emitter.cpp
+0
-0
gpu_emitter.hpp
src/ngraph/runtime/gpu/gpu_emitter.hpp
+30
-45
gpu_external_function.cpp
src/ngraph/runtime/gpu/gpu_external_function.cpp
+0
-0
gpu_external_function.hpp
src/ngraph/runtime/gpu/gpu_external_function.hpp
+2
-1
No files found.
src/ngraph/runtime/cpu/mkldnn_emitter.cpp
View file @
a5476da6
...
...
@@ -25,6 +25,12 @@
using
namespace
ngraph
::
runtime
::
cpu
;
MKLDNNEmitter
::~
MKLDNNEmitter
()
{
for
(
auto
p
:
m_mkldnn_primitives
)
delete
p
;
}
const
std
::
vector
<
mkldnn
::
primitive
*>&
MKLDNNEmitter
::
get_mkldnn_primitives
()
const
{
return
m_mkldnn_primitives
;
...
...
src/ngraph/runtime/cpu/mkldnn_emitter.hpp
View file @
a5476da6
...
...
@@ -39,6 +39,8 @@ namespace ngraph
{
public
:
MKLDNNEmitter
()
{}
~
MKLDNNEmitter
();
const
std
::
vector
<
mkldnn
::
primitive
*>&
get_mkldnn_primitives
()
const
;
size_t
insert_primitive
(
mkldnn
::
primitive
*
primitive
);
...
...
src/ngraph/runtime/gpu/gpu_emitter.cpp
View file @
a5476da6
This diff is collapsed.
Click to expand it.
src/ngraph/runtime/gpu/gpu_emitter.hpp
View file @
a5476da6
...
...
@@ -24,12 +24,12 @@
#include "ngraph/runtime/gpu/gpu_external_function.hpp"
#include "ngraph/runtime/gpu/gpu_tensor_view_wrapper.hpp"
#define EMITTER_DECL(
E)
\
E(codegen::CodeWriter& writer,
\
const ngraph::Node* n,
\
const std::vector<ngraph::runtime::gpu::GPU_TensorViewWrapper>& args,
\
const std::vector<ngraph::runtime::gpu::GPU_TensorViewWrapper>& out)
#define EMITTER_DECL(
op_name)
\
emit<op_name>(GPU_ExternalFunction * external_function,
\
codegen::CodeWriter & writer,
\
const ngraph::Node* node,
\
const std::vector<GPU_TensorViewWrapper>& args, \
const std::vector<GPU_TensorViewWrapper>& out)
namespace
ngraph
{
namespace
runtime
...
...
@@ -39,45 +39,30 @@ namespace ngraph
class
GPU_Emitter
{
public
:
static
void
EMITTER_DECL
(
EmitNop
);
static
void
EMITTER_DECL
(
EmitAdd
);
static
void
EMITTER_DECL
(
EmitDot
);
static
void
EMITTER_DECL
(
EmitMultiply
);
static
void
EMITTER_DECL
(
EmitGetOutputElement
);
static
void
EMITTER_DECL
(
EmitXLAGetTupleElement
);
static
void
EMITTER_DECL
(
EmitUnaryElementwise
);
static
void
EMITTER_DECL
(
EmitTuple
);
static
void
EMITTER_DECL
(
EmitConcat
);
static
void
EMITTER_DECL
(
EmitDivide
);
static
void
EMITTER_DECL
(
EmitEqual
);
static
void
EMITTER_DECL
(
EmitGreater
);
static
void
EMITTER_DECL
(
EmitGreaterEq
);
static
void
EMITTER_DECL
(
EmitLess
);
static
void
EMITTER_DECL
(
EmitLessEq
);
static
void
EMITTER_DECL
(
EmitMaximum
);
static
void
EMITTER_DECL
(
EmitMinimum
);
static
void
EMITTER_DECL
(
EmitNegative
);
static
void
EMITTER_DECL
(
EmitNotEqual
);
static
void
EMITTER_DECL
(
EmitSelect
);
static
void
EMITTER_DECL
(
EmitSubtract
);
static
void
EMITTER_DECL
(
EmitBroadcast
);
static
void
EMITTER_DECL
(
EmitConvert
);
static
void
EMITTER_DECL
(
EmitConstant
);
static
void
EMITTER_DECL
(
EmitReshape
);
static
void
EMITTER_DECL
(
EmitFunctionCall
);
static
void
EMITTER_DECL
(
EmitReduce
);
static
void
EMITTER_DECL
(
EmitSlice
);
static
void
EMITTER_DECL
(
EmitSum
);
static
void
EMITTER_DECL
(
EmitPower
);
static
void
EMITTER_DECL
(
EmitReplaceSlice
);
static
void
EMITTER_DECL
(
EmitOneHot
);
static
void
EMITTER_DECL
(
EmitSqrt
);
static
void
EMITTER_DECL
(
EmitConvolution
);
static
void
EMITTER_DECL
(
EmitMaxPool
);
static
void
EMITTER_DECL
(
EmitReverse
);
static
void
EMITTER_DECL
(
EmitReduceWindow
);
static
void
EMITTER_DECL
(
EmitSelectAndScatter
);
static
void
EMITTER_DECL
(
EmitResult
);
template
<
typename
OP
>
static
void
emit
(
GPU_ExternalFunction
*
external_function
,
codegen
::
CodeWriter
&
writer
,
const
ngraph
::
Node
*
node
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
args
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
out
)
{
throw
std
::
runtime_error
(
"Unimplemented op in GPU emitter for "
+
node
->
get_name
());
}
static
void
nop
(
GPU_ExternalFunction
*
external_function
,
codegen
::
CodeWriter
&
writer
,
const
ngraph
::
Node
*
node
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
args
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
out
)
{
}
static
void
EmitUnaryElementwise
(
GPU_ExternalFunction
*
external_function
,
codegen
::
CodeWriter
&
writer
,
const
ngraph
::
Node
*
node
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
args
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
out
);
};
}
}
...
...
src/ngraph/runtime/gpu/gpu_external_function.cpp
View file @
a5476da6
This diff is collapsed.
Click to expand it.
src/ngraph/runtime/gpu/gpu_external_function.hpp
View file @
a5476da6
...
...
@@ -41,7 +41,8 @@ namespace ngraph
class
GPU_CallFrame
;
using
OpFunction
=
std
::
function
<
void
(
codegen
::
CodeWriter
&
,
std
::
function
<
void
(
GPU_ExternalFunction
*
external_function
,
codegen
::
CodeWriter
&
,
const
ngraph
::
Node
*
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
inputs
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
outputs
)
>
;
...
...
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