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
2347d9e7
Unverified
Commit
2347d9e7
authored
Jan 11, 2020
by
Scott Cyphers
Committed by
GitHub
Jan 11, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
Fix klocwork issues (#4162)
parent
0bbd6f9d
Hide whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
4 additions
and
13 deletions
+4
-13
arithmetic_reduction.cpp
src/ngraph/op/util/arithmetic_reduction.cpp
+1
-1
logical_reduction.cpp
src/ngraph/op/util/logical_reduction.cpp
+1
-1
logical_reduction_keep_dims.cpp
src/ngraph/op/util/logical_reduction_keep_dims.cpp
+1
-1
constant_folding_one_hot.cpp
src/ngraph/pass/constant_folding_one_hot.cpp
+0
-8
one_hot.hpp
src/ngraph/runtime/reference/one_hot.hpp
+1
-2
No files found.
src/ngraph/op/util/arithmetic_reduction.cpp
View file @
2347d9e7
...
@@ -81,7 +81,7 @@ void op::util::ArithmeticReduction::validate_and_infer_types()
...
@@ -81,7 +81,7 @@ void op::util::ArithmeticReduction::validate_and_infer_types()
{
{
axis
=
normalize_axis
(
this
,
axis
,
size_t
(
input_rank
));
axis
=
normalize_axis
(
this
,
axis
,
size_t
(
input_rank
));
}
}
catch
(
const
ngraph_error
&
err
)
catch
(
const
ngraph_error
&
)
{
{
NODE_VALIDATION_CHECK
(
this
,
NODE_VALIDATION_CHECK
(
this
,
false
,
false
,
...
...
src/ngraph/op/util/logical_reduction.cpp
View file @
2347d9e7
...
@@ -80,7 +80,7 @@ void op::util::LogicalReduction::validate_and_infer_types()
...
@@ -80,7 +80,7 @@ void op::util::LogicalReduction::validate_and_infer_types()
{
{
axis
=
normalize_axis
(
this
,
axis
,
size_t
(
input_rank
));
axis
=
normalize_axis
(
this
,
axis
,
size_t
(
input_rank
));
}
}
catch
(
const
ngraph_error
&
err
)
catch
(
const
ngraph_error
&
)
{
{
NODE_VALIDATION_CHECK
(
this
,
NODE_VALIDATION_CHECK
(
this
,
false
,
false
,
...
...
src/ngraph/op/util/logical_reduction_keep_dims.cpp
View file @
2347d9e7
...
@@ -54,7 +54,7 @@ void op::util::LogicalReductionKeepDims::validate_and_infer_types()
...
@@ -54,7 +54,7 @@ void op::util::LogicalReductionKeepDims::validate_and_infer_types()
{
{
axis
=
normalize_axis
(
this
,
axis
,
size_t
(
input_rank
));
axis
=
normalize_axis
(
this
,
axis
,
size_t
(
input_rank
));
}
}
catch
(
const
ngraph_error
&
err
)
catch
(
const
ngraph_error
&
)
{
{
NODE_VALIDATION_CHECK
(
this
,
NODE_VALIDATION_CHECK
(
this
,
false
,
false
,
...
...
src/ngraph/pass/constant_folding_one_hot.cpp
View file @
2347d9e7
...
@@ -64,35 +64,27 @@ shared_ptr<op::Constant> fold_constant_one_hot(const shared_ptr<op::Constant>& i
...
@@ -64,35 +64,27 @@ shared_ptr<op::Constant> fold_constant_one_hot(const shared_ptr<op::Constant>& i
case
element
:
:
Type_t
::
i8
:
case
element
:
:
Type_t
::
i8
:
return
fold_constant_one_hot_ref
<
int8_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
int8_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
case
element
:
:
Type_t
::
i16
:
case
element
:
:
Type_t
::
i16
:
return
fold_constant_one_hot_ref
<
int16_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
int16_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
case
element
:
:
Type_t
::
i32
:
case
element
:
:
Type_t
::
i32
:
return
fold_constant_one_hot_ref
<
int32_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
int32_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
case
element
:
:
Type_t
::
i64
:
case
element
:
:
Type_t
::
i64
:
return
fold_constant_one_hot_ref
<
int64_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
int64_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
case
element
:
:
Type_t
::
u8
:
case
element
:
:
Type_t
::
u8
:
return
fold_constant_one_hot_ref
<
uint8_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
uint8_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
case
element
:
:
Type_t
::
u16
:
case
element
:
:
Type_t
::
u16
:
return
fold_constant_one_hot_ref
<
uint16_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
uint16_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
case
element
:
:
Type_t
::
u32
:
case
element
:
:
Type_t
::
u32
:
return
fold_constant_one_hot_ref
<
uint32_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
uint32_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
case
element
:
:
Type_t
::
u64
:
case
element
:
:
Type_t
::
u64
:
return
fold_constant_one_hot_ref
<
uint64_t
,
OUTPUT_TYPE
>
(
return
fold_constant_one_hot_ref
<
uint64_t
,
OUTPUT_TYPE
>
(
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
indices
,
on_value
,
off_value
,
output_shape
,
axis
);
break
;
}
}
}
}
...
...
src/ngraph/runtime/reference/one_hot.hpp
View file @
2347d9e7
...
@@ -79,8 +79,7 @@ namespace ngraph
...
@@ -79,8 +79,7 @@ namespace ngraph
{
{
const
T
on_value
=
1
;
const
T
on_value
=
1
;
const
T
off_value
=
0
;
const
T
off_value
=
0
;
return
one_hot
<
T
,
T
>
(
one_hot
<
T
,
T
>
(
arg
,
out
,
in_shape
,
out_shape
,
one_hot_axis
,
on_value
,
off_value
);
arg
,
out
,
in_shape
,
out_shape
,
one_hot_axis
,
on_value
,
off_value
);
}
}
}
}
}
}
...
...
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