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
c19e48a6
Commit
c19e48a6
authored
6 years ago
by
Sergey Shalnov
Committed by
Robert Kimball
6 years ago
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
IntelGPU backend: Floor operation fixed (#2403)
parent
3af90a22
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
21 additions
and
0 deletions
+21
-0
intelgpu_op_custom_kernels.cpp
src/ngraph/runtime/intelgpu/intelgpu_op_custom_kernels.cpp
+3
-0
backend_unary_elementwise.in.cpp
test/backend_unary_elementwise.in.cpp
+18
-0
No files found.
src/ngraph/runtime/intelgpu/intelgpu_op_custom_kernels.cpp
View file @
c19e48a6
...
...
@@ -1290,8 +1290,11 @@ void runtime::intelgpu::do_custom_eltwise_operation(cldnn::topology& topology,
break
;
}
case
CUSTOM_ELTWISE
:
:
Floor
:
{
if
(
input_type
.
is_real
())
{
writer
<<
"floor"
;
}
break
;
}
case
CUSTOM_ELTWISE
:
:
Sign
:
...
...
This diff is collapsed.
Click to expand it.
test/backend_unary_elementwise.in.cpp
View file @
c19e48a6
...
...
@@ -246,6 +246,24 @@ NGRAPH_TEST(${BACKEND_NAME}, floor)
EXPECT_EQ
((
vector
<
float
>
{
-
3.0
f
,
-
2.0
f
,
0.0
f
,
4.0
f
}),
read_vector
<
float
>
(
result
));
}
NGRAPH_TEST
(
$
{
BACKEND_NAME
},
floor_int32
)
{
Shape
shape
{
2
,
2
};
auto
A
=
make_shared
<
op
::
Parameter
>
(
element
::
i32
,
shape
);
auto
f
=
make_shared
<
Function
>
(
make_shared
<
op
::
Floor
>
(
A
),
ParameterVector
{
A
});
auto
backend
=
runtime
::
Backend
::
create
(
"${BACKEND_NAME}"
);
// Create some tensors for input/output
auto
a
=
backend
->
create_tensor
(
element
::
i32
,
shape
);
copy_data
(
a
,
vector
<
int32_t
>
{
-
2
,
-
136314880
,
0
,
4
});
auto
result
=
backend
->
create_tensor
(
element
::
i32
,
shape
);
auto
handle
=
backend
->
compile
(
f
);
backend
->
call_with_validate
(
handle
,
{
result
},
{
a
});
EXPECT_EQ
((
vector
<
int32_t
>
{
-
2
,
-
136314880
,
0
,
4
}),
read_vector
<
int32_t
>
(
result
));
}
NGRAPH_TEST
(
$
{
BACKEND_NAME
},
log
)
{
Shape
shape
{
2
,
2
,
2
};
...
...
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