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
4ffa0d83
Commit
4ffa0d83
authored
6 years ago
by
Adam Procter
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix a CoordinateTransform corner case exposed by ONNX unit tests
parent
7000d7d6
master
v0.29.0-rc.0
v0.28.0-rc.1
v0.28.0-rc.0
v0.27.1-rc.3
v0.27.1-rc.2
v0.27.1-rc.1
v0.27.1-rc.0
v0.27.0-rc.1
v0.27.0-rc.0
v0.26.1-rc.0
v0.26.0
v0.26.0-rc.8
v0.26.0-rc.7
v0.26.0-rc.6
v0.26.0-rc.5
v0.26.0-rc.4
v0.26.0-rc.3
v0.26.0-rc.2
v0.26.0-rc.0
v0.25.1-rc.11
v0.25.1-rc.10
v0.25.1-rc.9
v0.25.1-rc.8
v0.25.1-rc.7
v0.25.1-rc.6
v0.25.1-rc.5
v0.25.1-rc.4
v0.25.1-rc.3
v0.25.1-rc.2
v0.25.1-rc.1
v0.25.1-rc.0
v0.25.0
v0.25.0-rc.3
v0.25.0-rc.2
v0.25.0-rc.1
v0.25.0-rc.0
v0.25.0-dev.0
v0.24.0
v0.24.0-rc.3
v0.24.0-rc.2
v0.24.0-rc.1
v0.24.0-rc.0
v0.23.0-rc.7
v0.23.0-rc.6
v0.23.0-rc.5
v0.23.0-rc.4
v0.23.0-rc.3
v0.23.0-rc.2
v0.23.0-rc.1
v0.23.0-rc.0
v0.22.2-rc.0
v0.22.1
v0.22.1-rc.0
v0.22.0
v0.22.0-rc.2
v0.22.0-rc.0
v0.21.0
v0.21.0-rc.1
v0.21.0-rc.0
v0.20.1-rc.4
v0.20.1-rc.3
v0.20.1-rc.2
v0.20.1-rc.1
v0.20.1-rc.0
v0.20.0-rc.2
v0.20.0-rc.1
v0.20.0-rc.0
v0.20.0-dev.0
v0.19.1
v0.19.1-rc.0
v0.19.0
v0.19.0-rc.5
v0.19.0-rc.4
v0.19.0-rc.3
v0.19.0-rc.2
v0.19.0-rc.1
v0.19.0-rc.0
v0.18.1
v0.18.1-rc.1
v0.18.1-rc.0
v0.18.0
v0.18.0-rc.2
v0.18.0-rc.1
v0.18.0-rc.0
v0.17.0-rc.1
v0.17.0-rc.0
v0.16.0-rc.3
v0.16.0-rc.2
v0.16.0-rc.1
v0.16.0-rc.0
v0.15.1-rc.2
v0.15.1-rc.1
v0.15.0
v0.15.0-rc.2
v0.15.0-rc.1
v0.15.0-rc.0
v0.14.0
v0.14.0-rc.1
v0.14.0-rc.0
v0.13.0
v0.12.0
v0.12.0-rc.2
v0.12.0-rc.1
No related merge requests found
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
23 additions
and
1 deletion
+23
-1
coordinate_transform.cpp
src/ngraph/coordinate_transform.cpp
+1
-1
backend_test.in.cpp
test/backend_test.in.cpp
+22
-0
No files found.
src/ngraph/coordinate_transform.cpp
View file @
4ffa0d83
...
...
@@ -134,7 +134,7 @@ CoordinateTransform::CoordinateTransform(const Shape& source_shape,
for
(
size_t
i
=
0
;
i
<
m_n_axes
;
i
++
)
{
if
(
source_start_corner
[
i
]
>=
padded_upper_bounds
[
i
]
&&
!
(
source_start_corner
[
i
]
==
0
&&
source_shape
[
i
]
==
0
)
)
source_start_corner
[
i
]
!=
source_shape
[
i
]
)
{
std
::
stringstream
ss
;
...
...
This diff is collapsed.
Click to expand it.
test/backend_test.in.cpp
View file @
4ffa0d83
...
...
@@ -1714,6 +1714,28 @@ NGRAPH_TEST(${BACKEND_NAME}, slice_3d_strided_different_strides)
EXPECT_EQ
((
vector
<
float
>
{
0
,
3
,
8
,
11
,
32
,
35
,
40
,
43
}),
read_vector
<
float
>
(
result
));
}
NGRAPH_TEST
(
$
{
BACKEND_NAME
},
slice_3d_start_just_oob
)
{
Shape
shape_a
{
20
,
10
,
5
};
auto
A
=
make_shared
<
op
::
Parameter
>
(
element
::
f32
,
shape_a
);
Shape
shape_r
{
20
,
0
,
5
};
auto
r
=
make_shared
<
op
::
Slice
>
(
A
,
Coordinate
{
0
,
10
,
0
},
Coordinate
{
20
,
10
,
5
},
Strides
{
1
,
1
,
1
});
auto
f
=
make_shared
<
Function
>
(
r
,
ParameterVector
{
A
});
auto
backend
=
runtime
::
Backend
::
create
(
"${BACKEND_NAME}"
);
// Create some tensors for input/output
auto
a
=
backend
->
create_tensor
(
element
::
f32
,
shape_a
);
vector
<
float
>
a_data
(
20
*
10
*
5
,
222.0
f
);
copy_data
(
a
,
a_data
);
auto
result
=
backend
->
create_tensor
(
element
::
f32
,
shape_r
);
auto
handle
=
backend
->
compile
(
f
);
backend
->
call_with_validate
(
handle
,
{
result
},
{
a
});
EXPECT_EQ
((
vector
<
float
>
{}),
read_vector
<
float
>
(
result
));
}
NGRAPH_TEST
(
$
{
BACKEND_NAME
},
scalar_constant_float32
)
{
auto
r
=
op
::
Constant
::
create
(
element
::
f32
,
Shape
{},
{
4.75
});
...
...
This diff is collapsed.
Click to expand 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