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
2fc73b43
Unverified
Commit
2fc73b43
authored
Nov 09, 2018
by
Robert Kimball
Committed by
GitHub
Nov 09, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
optimization for about 2x speedup (#2036)
* optimization for about 2x speedup * more optimizations
parent
0ac2a8b6
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
7 additions
and
5 deletions
+7
-5
coordinate_transform.cpp
src/ngraph/coordinate_transform.cpp
+1
-0
coordinate_transform.hpp
src/ngraph/coordinate_transform.hpp
+2
-2
convolution.hpp
src/ngraph/runtime/reference/convolution.hpp
+4
-3
No files found.
src/ngraph/coordinate_transform.cpp
View file @
2fc73b43
...
...
@@ -45,6 +45,7 @@ CoordinateTransform::CoordinateTransform(const Shape& source_shape,
,
m_target_padding_below
(
target_padding_below
)
,
m_target_padding_above
(
target_padding_above
)
,
m_target_dilation_strides
(
target_dilation_strides
)
,
m_end_iterator
(
Shape
(),
true
)
{
m_n_axes
=
source_shape
.
size
();
...
...
src/ngraph/coordinate_transform.hpp
View file @
2fc73b43
...
...
@@ -93,8 +93,7 @@ namespace ngraph
};
Iterator
begin
()
noexcept
{
return
Iterator
(
m_target_shape
);
}
Iterator
end
()
noexcept
{
return
Iterator
(
m_target_shape
,
true
);
}
private
:
Iterator
end
()
noexcept
{
return
m_end_iterator
;
}
size_t
index_source
(
const
Coordinate
&
c
)
const
;
static
Strides
default_strides
(
size_t
n_axes
);
static
CoordinateDiff
default_padding
(
size_t
n_axes
);
...
...
@@ -113,5 +112,6 @@ namespace ngraph
Shape
m_target_shape
;
size_t
m_n_axes
;
Iterator
m_end_iterator
;
};
}
src/ngraph/runtime/reference/convolution.hpp
View file @
2fc73b43
...
...
@@ -59,7 +59,7 @@ namespace ngraph
// At the outermost level we will walk over every output coordinate O.
CoordinateTransform
output_transform
(
out_shape
);
for
(
Coordinate
out_coord
:
output_transform
)
for
(
const
Coordinate
&
out_coord
:
output_transform
)
{
// Our output coordinate O will have the form:
//
...
...
@@ -169,9 +169,10 @@ namespace ngraph
CoordinateTransform
::
Iterator
input_it
=
input_batch_transform
.
begin
();
CoordinateTransform
::
Iterator
filter_it
=
filter_transform
.
begin
();
CoordinateTransform
::
Iterator
input_it_end
=
input_batch_transform
.
end
();
CoordinateTransform
::
Iterator
filter_it_end
=
filter_transform
.
end
();
while
(
input_it
!=
input_batch_transform
.
end
()
&&
filter_it
!=
filter_transform
.
end
())
while
(
input_it
!=
input_it_end
&&
filter_it
!=
filter_it_end
)
{
const
Coordinate
&
input_batch_coord
=
*
input_it
;
Coordinate
filter_coord
=
*
filter_it
;
...
...
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