Skip to content
Projects
Groups
Snippets
Help
This project
Loading...
Sign in / Register
Toggle navigation
T
tic
Overview
Overview
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
Wiki
Wiki
Snippets
Snippets
Members
Members
Collapse sidebar
Close sidebar
Activity
Graph
Charts
Create a new issue
Jobs
Commits
Issue Boards
Open sidebar
wenyuanbo
tic
Commits
26621257
Unverified
Commit
26621257
authored
Jan 24, 2020
by
masahi
Committed by
GitHub
Jan 24, 2020
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
add missing nullptr check (#4773)
parent
69d2f9bd
Show whitespace changes
Inline
Side-by-side
Showing
5 changed files
with
5 additions
and
0 deletions
+5
-0
src/relay/qnn/op/add.cc
+1
-0
src/relay/qnn/op/dequantize.cc
+1
-0
src/relay/qnn/op/mul.cc
+1
-0
src/relay/qnn/op/quantize.cc
+1
-0
src/relay/qnn/op/requantize.cc
+1
-0
No files found.
src/relay/qnn/op/add.cc
View file @
26621257
...
...
@@ -55,6 +55,7 @@ Expr QnnAddCanonicalize(const Attrs& attrs, const Array<Expr>& new_args,
// Get the input dtype and shape.
CHECK_EQ
(
arg_types
.
size
(),
9
);
auto
tensor_type
=
arg_types
[
0
].
as
<
TensorTypeNode
>
();
CHECK
(
tensor_type
!=
nullptr
);
auto
input_dtype
=
tensor_type
->
dtype
;
auto
input_shape
=
tensor_type
->
shape
;
...
...
src/relay/qnn/op/dequantize.cc
View file @
26621257
...
...
@@ -39,6 +39,7 @@ bool DequantizeRel(const Array<Type>& types,
const
TypeReporter
&
reporter
)
{
CHECK_EQ
(
types
.
size
(),
4
);
const
auto
*
data
=
types
[
0
].
as
<
TensorTypeNode
>
();
CHECK
(
data
!=
nullptr
);
const
auto
input_dtype
=
data
->
dtype
;
CHECK
(
input_dtype
==
DataType
::
Int
(
8
)
||
input_dtype
==
DataType
::
UInt
(
8
)
||
...
...
src/relay/qnn/op/mul.cc
View file @
26621257
...
...
@@ -55,6 +55,7 @@ Expr QnnMulCanonicalize(const Attrs& attrs, const Array<Expr>& new_args,
// Get the input dtype and shape.
CHECK_EQ
(
arg_types
.
size
(),
9
);
auto
tensor_type
=
arg_types
[
0
].
as
<
TensorTypeNode
>
();
CHECK
(
tensor_type
!=
nullptr
);
auto
input_dtype
=
tensor_type
->
dtype
;
auto
input_shape
=
tensor_type
->
shape
;
...
...
src/relay/qnn/op/quantize.cc
View file @
26621257
...
...
@@ -41,6 +41,7 @@ bool QuantizeRel(const Array<Type>& types,
const
TypeReporter
&
reporter
)
{
CHECK_EQ
(
types
.
size
(),
4
);
const
auto
*
data
=
types
[
0
].
as
<
TensorTypeNode
>
();
CHECK
(
data
!=
nullptr
);
const
auto
input_dtype
=
data
->
dtype
;
CHECK
(
input_dtype
==
DataType
::
Float
(
32
))
<<
"Input type should be one of float32 but was "
<<
input_dtype
;
...
...
src/relay/qnn/op/requantize.cc
View file @
26621257
...
...
@@ -169,6 +169,7 @@ bool RequantizeRel(const Array<Type>& types, int num_inputs, const Attrs& attrs,
const
TypeReporter
&
reporter
)
{
CHECK_EQ
(
types
.
size
(),
6
);
const
auto
*
data
=
types
[
0
].
as
<
TensorTypeNode
>
();
CHECK
(
data
!=
nullptr
);
const
auto
in_dtype
=
data
->
dtype
;
CHECK
(
in_dtype
==
DataType
::
Int
(
8
)
||
in_dtype
==
DataType
::
UInt
(
8
)
||
...
...
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