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
c671a2b7
Commit
c671a2b7
authored
Sep 22, 2018
by
shssf
Committed by
Robert Kimball
Sep 22, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IntelGPU backend. Fix bug in Concat and small refactoring (#1668)
parent
015435d8
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
13 additions
and
12 deletions
+13
-12
intelgpu_backend.cpp
src/ngraph/runtime/intelgpu/intelgpu_backend.cpp
+13
-12
No files found.
src/ngraph/runtime/intelgpu/intelgpu_backend.cpp
View file @
c671a2b7
...
...
@@ -73,6 +73,8 @@
using
namespace
std
;
using
namespace
ngraph
;
using
intelgpu_space
=
runtime
::
intelgpu
::
IntelGPULayout
;
// This expands the op list in op_tbl.hpp into a list of enumerations that look like this:
// Abs,
// Acos,
...
...
@@ -176,14 +178,10 @@ static void do_pooling_operation(cldnn::topology& topology,
{
arguments_check
(
op
,
1
,
1
);
const
cldnn
::
tensor
output_size
=
runtime
::
intelgpu
::
IntelGPULayout
::
create_cldnn_tensor
(
get_output_shape
(
op
));
const
cldnn
::
tensor
input_offset
=
runtime
::
intelgpu
::
IntelGPULayout
::
create_cldnn_offset
(
pad_below
);
const
cldnn
::
tensor
size
=
runtime
::
intelgpu
::
IntelGPULayout
::
create_cldnn_tensor
(
pool_shape
);
const
cldnn
::
tensor
stride
=
runtime
::
intelgpu
::
IntelGPULayout
::
create_cldnn_tensor
(
pool_strides
);
const
cldnn
::
tensor
output_size
=
intelgpu_space
::
create_cldnn_tensor
(
get_output_shape
(
op
));
const
cldnn
::
tensor
input_offset
=
intelgpu_space
::
create_cldnn_offset
(
pad_below
);
const
cldnn
::
tensor
size
=
intelgpu_space
::
create_cldnn_tensor
(
pool_shape
);
const
cldnn
::
tensor
stride
=
intelgpu_space
::
create_cldnn_tensor
(
pool_strides
);
const
cldnn
::
pooling
cldnn_pooling
(
get_output_name
(
op
),
get_input_name
(
op
),
mode
,
size
,
stride
,
input_offset
,
output_size
);
...
...
@@ -409,14 +407,17 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func)
{
arguments_check
(
op
,
1
,
1
);
}
const
size_t
ngraph_tensor_dims
=
get_input_shape
(
op
,
0
).
size
();
// All input shapes must be the same
// if shape is empty (means Shape{}) in this case treat its size as 1
const
size_t
ngraph_tensor_dims
=
get_input_shape
(
op
).
empty
()
?
1
:
get_input_shape
(
op
).
size
();
const
shared_ptr
<
op
::
Concat
>
concat_op
=
static_pointer_cast
<
op
::
Concat
>
(
op
);
const
size_t
ngraph_concat_axis
=
concat_op
->
get_concatenation_axis
();
vector
<
cldnn
::
primitive_id
>
inputs
;
cldnn
::
concatenation
::
concatenation_axis
cldnn_axis
=
runtime
::
intelgpu
::
IntelGPULayout
::
get_cldnn_axis
(
ngraph_tensor_dims
,
ngraph_concat_axis
);
intelgpu_space
::
get_cldnn_axis
(
ngraph_tensor_dims
,
ngraph_concat_axis
);
for
(
auto
const
&
input
:
op
->
get_inputs
())
{
...
...
@@ -612,7 +613,7 @@ bool runtime::intelgpu::IntelGPUBackend::compile(shared_ptr<Function> func)
(
get_input_shape
(
op
).
size
()
==
1
&&
get_input_shape
(
op
).
at
(
0
)
==
1
))
{
const
cldnn
::
tensor
output_tensor_size
=
runtime
::
intelgpu
::
IntelGPULayout
::
create_cldnn_tensor
(
get_output_shape
(
op
));
intelgpu_space
::
create_cldnn_tensor
(
get_output_shape
(
op
));
const
cldnn
::
broadcast
cldnn_broadcast
(
get_output_name
(
op
),
get_input_name
(
op
),
output_tensor_size
);
topology
.
add
(
cldnn_broadcast
);
...
...
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