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
b9cbd039
Commit
b9cbd039
authored
Sep 03, 2018
by
shssf
Committed by
Robert Kimball
Sep 03, 2018
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
TEST: simple test with one constant to two outputs (#1537)
parent
817210cf
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
18 additions
and
0 deletions
+18
-0
unit_test.manifest
src/ngraph/runtime/intelgpu/unit_test.manifest
+1
-0
backend_test.in.cpp
test/backend_test.in.cpp
+17
-0
No files found.
src/ngraph/runtime/intelgpu/unit_test.manifest
View file @
b9cbd039
...
...
@@ -80,6 +80,7 @@ select_and_scatter_without_overlap
select_and_scatter_with_overlap
sign
tan
tensor_2constant
tensor_constant_int64
validate_call_input_type
validate_call_output_type
...
...
test/backend_test.in.cpp
View file @
b9cbd039
...
...
@@ -1740,6 +1740,23 @@ NGRAPH_TEST(${BACKEND_NAME}, tensor_constant)
EXPECT_EQ
((
vector
<
float
>
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
}),
read_vector
<
float
>
(
result
));
}
NGRAPH_TEST
(
$
{
BACKEND_NAME
},
tensor_2constant
)
{
Shape
shape
{
2
,
2
,
2
};
auto
A
=
op
::
Constant
::
create
(
element
::
f32
,
shape
,
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
});
auto
f
=
make_shared
<
Function
>
(
NodeVector
{
A
,
A
},
op
::
ParameterVector
{});
auto
backend
=
runtime
::
Backend
::
create
(
"${BACKEND_NAME}"
);
// Create some tensors for input/output
auto
result0
=
backend
->
create_tensor
(
element
::
f32
,
shape
);
auto
result1
=
backend
->
create_tensor
(
element
::
f32
,
shape
);
backend
->
call_with_validate
(
f
,
{
result0
,
result1
},
{});
EXPECT_EQ
((
vector
<
float
>
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
}),
read_vector
<
float
>
(
result0
));
EXPECT_EQ
((
vector
<
float
>
{
1
,
2
,
3
,
4
,
5
,
6
,
7
,
8
}),
read_vector
<
float
>
(
result1
));
}
NGRAPH_TEST
(
$
{
BACKEND_NAME
},
tensor_constant_with_op
)
{
Shape
shape
{
2
,
2
,
2
};
...
...
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