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
070ea46c
Commit
070ea46c
authored
Aug 11, 2018
by
Chris Sullivan
Committed by
Scott Cyphers
Aug 11, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add op::Sigmoid to nvgpu. (#1398)
parent
80514868
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
20 additions
and
5 deletions
+20
-5
gpu_cuda_kernel_ops.hpp
src/ngraph/runtime/gpu/gpu_cuda_kernel_ops.hpp
+16
-0
gpu_external_function.cpp
src/ngraph/runtime/gpu/gpu_external_function.cpp
+4
-0
unit_test.manifest
src/ngraph/runtime/gpu/unit_test.manifest
+0
-5
No files found.
src/ngraph/runtime/gpu/gpu_cuda_kernel_ops.hpp
View file @
070ea46c
...
...
@@ -61,6 +61,8 @@ namespace ngraph
class
And
;
class
Or
;
class
Nop
;
class
Sigmoid
;
class
SigmoidBackprop
;
}
namespace
runtime
{
...
...
@@ -363,6 +365,20 @@ namespace ngraph
static
constexpr
const
char
*
math_kernel
=
""
;
static
constexpr
const
char
*
atomic
=
""
;
};
template
<>
struct
CudaOpMap
<
ngraph
::
op
::
Sigmoid
>
{
static
constexpr
const
char
*
op
=
"sigmoid"
;
static
constexpr
const
char
*
math_kernel
=
"1 / (1 + expf(-x0))"
;
};
template
<>
struct
CudaOpMap
<
ngraph
::
op
::
SigmoidBackprop
>
{
static
constexpr
const
char
*
op
=
"sigmoid_backprop"
;
static
constexpr
const
char
*
math_kernel
=
"x1 / (2 + expf(-x0) + expf(x0))"
;
};
}
}
}
src/ngraph/runtime/gpu/gpu_external_function.cpp
View file @
070ea46c
...
...
@@ -88,6 +88,7 @@
#include "ngraph/op/reverse_sequence.hpp"
#include "ngraph/op/select.hpp"
#include "ngraph/op/select_and_scatter.hpp"
#include "ngraph/op/sigmoid.hpp"
#include "ngraph/op/sign.hpp"
#include "ngraph/op/sin.hpp"
#include "ngraph/op/sinh.hpp"
...
...
@@ -236,6 +237,9 @@ static const runtime::gpu::OpMap dispatcher{
{
TI
(
ngraph
::
op
::
ReluBackprop
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit_elementwise
<
ngraph
::
op
::
ReluBackprop
>
},
{
TI
(
ngraph
::
op
::
Softmax
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit
<
ngraph
::
op
::
Softmax
>
},
{
TI
(
ngraph
::
op
::
Sigmoid
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit_elementwise
<
ngraph
::
op
::
Sigmoid
>
},
{
TI
(
ngraph
::
op
::
SigmoidBackprop
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit_elementwise
<
ngraph
::
op
::
SigmoidBackprop
>
},
{
TI
(
ngraph
::
op
::
And
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit_elementwise
<
ngraph
::
op
::
And
>
},
{
TI
(
ngraph
::
op
::
Or
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit_elementwise
<
ngraph
::
op
::
Or
>
}};
...
...
src/ngraph/runtime/gpu/unit_test.manifest
View file @
070ea46c
...
...
@@ -24,11 +24,6 @@ select_and_scatter_with_overlap
select_and_scatter_without_overlap
#custom_mem is not implemented on GPU
tensorview_custom_mem
#sigmoid not implemented
sigmoid_n1c1h2w2
sigmoid_n1c1h4
sigmoid_bprop_n1c1h4
backwards_sigmoid
#integer is not supported by cuDNN on backward pooling
backwards_maxpool_n4_c1_hw4_2x2_max
backwards_maxpool_n2_c1_hw5_3x3_str2_max
...
...
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