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
94cd8274
Commit
94cd8274
authored
Mar 07, 2018
by
fenglei.tian
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add template
parent
8eb31b78
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
4 changed files
with
13 additions
and
5 deletions
+13
-5
gpu_emitter.cpp
src/ngraph/runtime/gpu/gpu_emitter.cpp
+9
-4
gpu_emitter.hpp
src/ngraph/runtime/gpu/gpu_emitter.hpp
+3
-1
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
+1
-0
No files found.
src/ngraph/runtime/gpu/gpu_emitter.cpp
View file @
94cd8274
...
...
@@ -91,8 +91,8 @@
#include "ngraph/ops/sum.hpp"
#include "ngraph/ops/tan.hpp"
#include "ngraph/ops/tanh.hpp"
#include "ngraph/runtime/gpu/gpu_cuda_kernel_emitters.hpp"
#include "ngraph/runtime/gpu/gpu_emitter.hpp"
#include "ngraph/runtime/gpu/gpu_cuda_kernel_emitters.hpp"
#include "ngraph/runtime/gpu/gpu_kernel_emitters.hpp"
#include "ngraph/util.hpp"
...
...
@@ -106,7 +106,8 @@ namespace ngraph
{
template
<>
void
GPU_Emitter
::
EMITTER_DECL
(
ngraph
::
op
::
Abs
)
{
{
std
::
cout
<<
"abs"
<<
std
::
endl
;
writer
<<
"{ // "
<<
node
->
get_name
()
<<
"
\n
"
;
writer
.
indent
++
;
writer
<<
"int count = "
<<
out
[
0
].
get_size
()
<<
";
\n
"
;
...
...
@@ -467,7 +468,7 @@ cudnnSetOpTensorDescriptor(opTensorDesc,
void
GPU_Emitter
::
EMITTER_DECL
(
ngraph
::
op
::
Constant
)
{
}
template
<>
void
GPU_Emitter
::
EMITTER_DECL
(
ngraph
::
op
::
Reshape
)
{
...
...
@@ -577,7 +578,11 @@ cudnnSetOpTensorDescriptor(opTensorDesc,
writer
.
indent
--
;
writer
<<
"}
\n
"
;
}
template
<>
void
GPU_Emitter
::
EMITTER_DECL
(
ngraph
::
op
::
Result
)
{
}
template
<>
void
GPU_Emitter
::
EMITTER_DECL
(
ngraph
::
op
::
Sqrt
)
{
...
...
src/ngraph/runtime/gpu/gpu_emitter.hpp
View file @
94cd8274
...
...
@@ -45,7 +45,8 @@ namespace ngraph
const
ngraph
::
Node
*
node
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
args
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
out
)
{
{
std
::
cout
<<
node
->
get_name
()
<<
std
::
endl
;
throw
std
::
runtime_error
(
"Unimplemented op in GPU emitter"
);
}
...
...
@@ -55,6 +56,7 @@ namespace ngraph
const
std
::
vector
<
GPU_TensorViewWrapper
>&
args
,
const
std
::
vector
<
GPU_TensorViewWrapper
>&
out
)
{
std
::
cout
<<
"nop"
<<
std
::
endl
;
}
private
:
...
...
src/ngraph/runtime/gpu/gpu_external_function.cpp
View file @
94cd8274
This diff is collapsed.
Click to expand it.
src/ngraph/runtime/gpu/gpu_external_function.hpp
View file @
94cd8274
...
...
@@ -82,6 +82,7 @@ namespace ngraph
std
::
unique_ptr
<
codegen
::
ExecutionEngine
>
m_execution_engine
;
bool
m_emit_timing
;
std
::
unordered_map
<
std
::
string
,
std
::
string
>
m_variable_name_map
;
std
::
string
m_function_name
;
};
}
}
...
...
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