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
72f4d661
Commit
72f4d661
authored
Mar 22, 2018
by
Chris Sullivan
Committed by
adstraw
Mar 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Add op::ReluBackprop to GPU transformer (#712)
* Added backprop op for relu and enabled tests.
parent
22d1e52b
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
9 additions
and
3 deletions
+9
-3
gpu_cuda_kernel_ops.hpp
src/ngraph/runtime/gpu/gpu_cuda_kernel_ops.hpp
+8
-0
gpu_external_function.cpp
src/ngraph/runtime/gpu/gpu_external_function.cpp
+1
-1
backend_test.in.cpp
test/backend_test.in.cpp
+0
-2
No files found.
src/ngraph/runtime/gpu/gpu_cuda_kernel_ops.hpp
View file @
72f4d661
...
...
@@ -47,6 +47,7 @@ namespace ngraph
class
LessEq
;
class
Not
;
class
Relu
;
class
ReluBackprop
;
class
Max
;
class
Min
;
class
Negative
;
...
...
@@ -266,6 +267,13 @@ namespace ngraph
static
constexpr
const
char
*
op
=
"not"
;
static
constexpr
const
char
*
math_kernel
=
"!x0"
;
};
template
<>
struct
CudaOpMap
<
ngraph
::
op
::
ReluBackprop
>
{
static
constexpr
const
char
*
op
=
"relu_backprop"
;
static
constexpr
const
char
*
math_kernel
=
"x1 * int(x0 > 0)"
;
};
}
}
}
src/ngraph/runtime/gpu/gpu_external_function.cpp
View file @
72f4d661
...
...
@@ -232,7 +232,7 @@ static const runtime::gpu::OpMap dispatcher{
{
TI
(
ngraph
::
op
::
Max
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit
<
ngraph
::
op
::
Max
>
},
{
TI
(
ngraph
::
op
::
Min
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit
<
ngraph
::
op
::
Min
>
},
{
TI
(
ngraph
::
op
::
Relu
),
&
runtime
::
gpu
::
GPU_Emitter
::
EmitElementwise
},
{
TI
(
ngraph
::
op
::
ReluBackprop
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit
<
ngraph
::
op
::
ReluBackprop
>
},
{
TI
(
ngraph
::
op
::
ReluBackprop
),
&
runtime
::
gpu
::
GPU_Emitter
::
EmitElementwise
},
{
TI
(
ngraph
::
op
::
Softmax
),
&
runtime
::
gpu
::
GPU_Emitter
::
emit
<
ngraph
::
op
::
Softmax
>
},
};
...
...
test/backend_test.in.cpp
View file @
72f4d661
...
...
@@ -8433,7 +8433,6 @@ TEST(${BACKEND_NAME}, fuse_max_with_constant_zero_input_as_relu)
TEST
(
$
{
BACKEND_NAME
},
relu_2Dbackprop
)
{
SKIP_TEST_FOR
(
"GPU"
,
"${BACKEND_NAME}"
);
auto
shape_a
=
Shape
{
2
,
5
};
auto
A
=
make_shared
<
op
::
Parameter
>
(
element
::
f32
,
shape_a
);
auto
delta_val
=
make_shared
<
op
::
Parameter
>
(
element
::
f32
,
shape_a
);
...
...
@@ -8459,7 +8458,6 @@ TEST(${BACKEND_NAME}, relu_2Dbackprop)
TEST
(
$
{
BACKEND_NAME
},
relu_4Dbackprop
)
{
SKIP_TEST_FOR
(
"GPU"
,
"${BACKEND_NAME}"
);
auto
shape_a
=
Shape
{
2
,
2
,
2
,
2
};
auto
A
=
make_shared
<
op
::
Parameter
>
(
element
::
f32
,
shape_a
);
auto
delta_val
=
make_shared
<
op
::
Parameter
>
(
element
::
f32
,
shape_a
);
...
...
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