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
eedea8d4
Commit
eedea8d4
authored
Feb 26, 2018
by
Scott Cyphers
Committed by
Robert Kimball
Feb 26, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Move Concat to the correct file (#539)
parent
13ac7882
Expand all
Hide whitespace changes
Inline
Side-by-side
Showing
16 changed files
with
12 additions
and
168 deletions
+12
-168
.gitignore
.gitignore
+1
-0
ngraph.doxyfile_backup
doc/sphinx/ngraph.doxyfile_backup
+0
-0
theme.css.backup
doc/sphinx/ngraph_theme/static/css/theme.css.backup
+0
-0
CMakeLists.txt
src/ngraph/CMakeLists.txt
+1
-1
ngraph.hpp
src/ngraph/ngraph.hpp
+1
-1
concat.cpp
src/ngraph/ops/concat.cpp
+1
-1
concatenate.cpp
src/ngraph/ops/concatenate.cpp
+0
-106
concatenate.hpp
src/ngraph/ops/concatenate.hpp
+0
-51
cpu_emitter.cpp
src/ngraph/runtime/cpu/cpu_emitter.cpp
+1
-1
cpu_external_function.cpp
src/ngraph/runtime/cpu/cpu_external_function.cpp
+1
-1
gpu_emitter.cpp
src/ngraph/runtime/gpu/gpu_emitter.cpp
+1
-1
gpu_external_function.cpp
src/ngraph/runtime/gpu/gpu_external_function.cpp
+1
-1
int_call_frame.hpp
src/ngraph/runtime/interpreter/int_call_frame.hpp
+1
-1
int_external_function.cpp
src/ngraph/runtime/interpreter/int_external_function.cpp
+1
-1
serializer.cpp
src/ngraph/serializer.cpp
+1
-1
backend_performance.cpp
test/backend_performance.cpp
+1
-1
No files found.
.gitignore
View file @
eedea8d4
...
@@ -48,6 +48,7 @@ output/
...
@@ -48,6 +48,7 @@ output/
*.mpg
*.mpg
*.cpio
*.cpio
*.wav
*.wav
*.backup
doc/source/generated
doc/source/generated
.cache/
.cache/
nervana_aeon.egg-info/
nervana_aeon.egg-info/
...
...
doc/sphinx/ngraph.doxyfile_backup
deleted
100644 → 0
View file @
13ac7882
This diff is collapsed.
Click to expand it.
doc/sphinx/ngraph_theme/static/css/theme.css.backup
deleted
100644 → 0
View file @
13ac7882
This diff is collapsed.
Click to expand it.
src/ngraph/CMakeLists.txt
View file @
eedea8d4
...
@@ -38,7 +38,7 @@ set (SRC
...
@@ -38,7 +38,7 @@ set (SRC
ops/avg_pool.cpp
ops/avg_pool.cpp
ops/batch_norm.cpp
ops/batch_norm.cpp
ops/broadcast.cpp
ops/broadcast.cpp
ops/concat
enate
.cpp
ops/concat.cpp
ops/constant.cpp
ops/constant.cpp
ops/convert.cpp
ops/convert.cpp
ops/convolution.cpp
ops/convolution.cpp
...
...
src/ngraph/ngraph.hpp
View file @
eedea8d4
...
@@ -73,7 +73,7 @@
...
@@ -73,7 +73,7 @@
#include "ngraph/ops/avg_pool.hpp"
#include "ngraph/ops/avg_pool.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/convolution.hpp"
...
...
src/ngraph/ops/concat.cpp
View file @
eedea8d4
...
@@ -17,7 +17,7 @@
...
@@ -17,7 +17,7 @@
#include <cassert>
#include <cassert>
#include <memory>
#include <memory>
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/slice.hpp"
#include "ngraph/ops/slice.hpp"
using
namespace
std
;
using
namespace
std
;
...
...
src/ngraph/ops/concatenate.cpp
deleted
100644 → 0
View file @
13ac7882
/*******************************************************************************
* Copyright 2017-2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
#include <cassert>
#include <memory>
#include "ngraph/ops/concatenate.hpp"
#include "ngraph/ops/slice.hpp"
using
namespace
std
;
using
namespace
ngraph
;
op
::
Concat
::
Concat
(
const
Nodes
&
args
,
size_t
concatenation_axis
)
:
RequiresTensorViewArgs
(
"Concat"
,
args
)
,
m_concatenation_axis
(
concatenation_axis
)
{
if
(
m_inputs
.
size
()
<
1
)
{
throw
ngraph_error
(
"At least one argument required"
);
}
auto
&
input_0
=
get_inputs
().
at
(
0
);
auto
input_0_shape
=
input_0
.
get_shape
();
if
(
m_concatenation_axis
>=
input_0_shape
.
size
())
{
throw
ngraph_error
(
"Concatenation axis is out of bounds"
);
}
size_t
concatenation_axis_length
=
input_0_shape
.
at
(
m_concatenation_axis
);
auto
&
input_0_element_type
=
input_0
.
get_element_type
();
for
(
auto
i
=
1
;
i
<
get_inputs
().
size
();
i
++
)
{
auto
&
input_i
=
get_inputs
().
at
(
i
);
auto
input_i_shape
=
input_i
.
get_shape
();
if
(
input_i_shape
.
size
()
!=
input_0_shape
.
size
())
{
throw
ngraph_error
(
"Arguments to concat do not have same rank"
);
}
if
(
input_i
.
get_element_type
()
!=
input_0_element_type
)
{
throw
ngraph_error
(
"Argument element types do not match"
);
}
for
(
auto
j
=
0
;
j
<
input_i_shape
.
size
();
j
++
)
{
if
(
j
!=
m_concatenation_axis
&&
input_0_shape
.
at
(
j
)
!=
input_i_shape
.
at
(
j
))
{
throw
ngraph_error
(
"Arguments to concat do not have same dimension on a non-concatenation axis"
);
}
else
if
(
j
==
m_concatenation_axis
)
{
concatenation_axis_length
+=
input_i_shape
.
at
(
j
);
}
}
}
vector
<
size_t
>
concatenated_shape
=
input_0_shape
;
concatenated_shape
.
at
(
m_concatenation_axis
)
=
concatenation_axis_length
;
set_value_type_checked
(
make_shared
<
TensorViewType
>
(
input_0_element_type
,
concatenated_shape
));
}
void
op
::
Concat
::
generate_adjoints
(
autodiff
::
Adjoints
&
adjoints
,
const
std
::
shared_ptr
<
Node
>&
delta
)
{
auto
concat_result_shape
=
get_outputs
().
at
(
0
).
get_shape
();
Coordinate
arg_delta_slice_lower
=
Coordinate
(
concat_result_shape
.
size
(),
0
);
Coordinate
arg_delta_slice_upper
=
concat_result_shape
;
Coordinate
arg_delta_slice_strides
=
Coordinate
(
concat_result_shape
.
size
(),
1
);
size_t
pos
=
0
;
for
(
auto
arg
:
get_input_ops
())
{
auto
arg_shape
=
arg
->
get_shape
();
auto
slice_width
=
arg_shape
[
m_concatenation_axis
];
size_t
next_pos
=
pos
+
slice_width
;
arg_delta_slice_lower
[
m_concatenation_axis
]
=
pos
;
arg_delta_slice_upper
[
m_concatenation_axis
]
=
next_pos
;
adjoints
.
add_delta
(
arg
,
make_shared
<
op
::
Slice
>
(
delta
,
arg_delta_slice_lower
,
arg_delta_slice_upper
,
arg_delta_slice_strides
));
pos
=
next_pos
;
}
}
src/ngraph/ops/concatenate.hpp
deleted
100644 → 0
View file @
13ac7882
/*******************************************************************************
* Copyright 2017-2018 Intel Corporation
*
* Licensed under the Apache License, Version 2.0 (the "License");
* you may not use this file except in compliance with the License.
* You may obtain a copy of the License at
*
* http://www.apache.org/licenses/LICENSE-2.0
*
* Unless required by applicable law or agreed to in writing, software
* distributed under the License is distributed on an "AS IS" BASIS,
* WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.
* See the License for the specific language governing permissions and
* limitations under the License.
*******************************************************************************/
#pragma once
#include <memory>
#include "ngraph/ops/util/requires_tensor_view_args.hpp"
namespace
ngraph
{
namespace
op
{
/// \brief Concatenation operation.
class
Concat
:
public
util
::
RequiresTensorViewArgs
{
public
:
/// \brief Constructs a concatenation operation.
///
/// \param args The nodes producing the input tensors.
/// \param concatenation_axis The axis along which to concatenate the input tensors.
Concat
(
const
Nodes
&
args
,
size_t
concatenation_axis
);
virtual
std
::
shared_ptr
<
Node
>
copy_with_new_args
(
const
std
::
vector
<
std
::
shared_ptr
<
Node
>>&
new_args
)
const
override
{
return
std
::
make_shared
<
Concat
>
(
new_args
,
m_concatenation_axis
);
}
/// \return The concatenation axis.
size_t
get_concatenation_axis
()
const
{
return
m_concatenation_axis
;
}
protected
:
virtual
void
generate_adjoints
(
autodiff
::
Adjoints
&
adjoints
,
const
std
::
shared_ptr
<
Node
>&
delta
)
override
;
const
size_t
m_concatenation_axis
;
};
}
}
src/ngraph/runtime/cpu/cpu_emitter.cpp
View file @
eedea8d4
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include "ngraph/ops/batch_norm.hpp"
#include "ngraph/ops/batch_norm.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/convolution.hpp"
...
...
src/ngraph/runtime/cpu/cpu_external_function.cpp
View file @
eedea8d4
...
@@ -43,7 +43,7 @@
...
@@ -43,7 +43,7 @@
#include "ngraph/ops/batch_norm.hpp"
#include "ngraph/ops/batch_norm.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/convolution.hpp"
...
...
src/ngraph/runtime/gpu/gpu_emitter.cpp
View file @
eedea8d4
...
@@ -29,7 +29,7 @@
...
@@ -29,7 +29,7 @@
#include "ngraph/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/dot.hpp"
#include "ngraph/ops/dot.hpp"
...
...
src/ngraph/runtime/gpu/gpu_external_function.cpp
View file @
eedea8d4
...
@@ -45,7 +45,7 @@
...
@@ -45,7 +45,7 @@
#include "ngraph/ops/atan.hpp"
#include "ngraph/ops/atan.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/convolution.hpp"
...
...
src/ngraph/runtime/interpreter/int_call_frame.hpp
View file @
eedea8d4
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#include "ngraph/node.hpp"
#include "ngraph/node.hpp"
#include "ngraph/ops/avg_pool.hpp"
#include "ngraph/ops/avg_pool.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/dot.hpp"
#include "ngraph/ops/dot.hpp"
...
...
src/ngraph/runtime/interpreter/int_external_function.cpp
View file @
eedea8d4
...
@@ -34,7 +34,7 @@
...
@@ -34,7 +34,7 @@
#include "ngraph/ops/asin.hpp"
#include "ngraph/ops/asin.hpp"
#include "ngraph/ops/atan.hpp"
#include "ngraph/ops/atan.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/cos.hpp"
#include "ngraph/ops/cos.hpp"
...
...
src/ngraph/serializer.cpp
View file @
eedea8d4
...
@@ -25,7 +25,7 @@
...
@@ -25,7 +25,7 @@
#include "ngraph/ops/batch_norm.hpp"
#include "ngraph/ops/batch_norm.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/broadcast.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/ceiling.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/constant.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convert.hpp"
#include "ngraph/ops/convolution.hpp"
#include "ngraph/ops/convolution.hpp"
...
...
test/backend_performance.cpp
View file @
eedea8d4
...
@@ -24,7 +24,7 @@
...
@@ -24,7 +24,7 @@
#include "ngraph/codegen/execution_engine.hpp"
#include "ngraph/codegen/execution_engine.hpp"
#include "ngraph/file_util.hpp"
#include "ngraph/file_util.hpp"
#include "ngraph/log.hpp"
#include "ngraph/log.hpp"
#include "ngraph/ops/concat
enate
.hpp"
#include "ngraph/ops/concat.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/backend.hpp"
#include "ngraph/runtime/call_frame.hpp"
#include "ngraph/runtime/call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_call_frame.hpp"
#include "ngraph/runtime/cpu/cpu_call_frame.hpp"
...
...
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