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
1c0e7435
Commit
1c0e7435
authored
Oct 15, 2019
by
Animesh Jain
Committed by
Zhi
Oct 15, 2019
Browse files
Options
Browse Files
Download
Email Patches
Plain Diff
[QNN] Change default rouning to UPWARD. (#4131)
parent
11a3a777
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
3 additions
and
3 deletions
+3
-3
include/tvm/relay/qnn/attrs.h
+1
-1
python/tvm/relay/qnn/op/qnn.py
+1
-1
src/relay/qnn/util.h
+1
-1
No files found.
include/tvm/relay/qnn/attrs.h
View file @
1c0e7435
...
...
@@ -49,7 +49,7 @@ struct RequantizeAttrs : public tvm::AttrsNode<RequantizeAttrs> {
.
describe
(
"The scale of the output tensor."
);
TVM_ATTR_FIELD
(
output_zero_point
)
.
describe
(
"The zero point of the output tensor."
);
TVM_ATTR_FIELD
(
rounding
).
set_default
(
"
TONEAREST
"
)
TVM_ATTR_FIELD
(
rounding
).
set_default
(
"
UPWARD
"
)
.
describe
(
"Defines the rounding direction when the value is midway between"
"two representable values. There are two supported modes - UPWARD"
"or TONEAREST. Both modes behave exactly same except at the"
...
...
python/tvm/relay/qnn/op/qnn.py
View file @
1c0e7435
...
...
@@ -27,7 +27,7 @@ def requantize(data,
input_zero_point
,
output_scale
,
output_zero_point
,
rounding
=
"
TONEAREST
"
,
rounding
=
"
UPWARD
"
,
out_dtype
=
"int8"
):
r"""Requantized operator.
...
...
src/relay/qnn/util.h
View file @
1c0e7435
...
...
@@ -76,7 +76,7 @@ Expr RequantizeLower(const Expr& input_tensor, const RequantizeAttrs* param,
static
inline
Expr
Requantize
(
const
Expr
&
data
,
const
Array
<
IndexExpr
>&
input_shape
,
double
input_scale
,
int32_t
input_zero_point
,
double
output_scale
,
int32_t
output_zero_point
,
const
DataType
&
out_dtype
,
const
std
::
string
&
rounding
=
"
TONEAREST
"
)
{
const
std
::
string
&
rounding
=
"
UPWARD
"
)
{
auto
attrs
=
make_node
<
RequantizeAttrs
>
();
attrs
->
input_scale
=
std
::
move
(
input_scale
);
attrs
->
input_zero_point
=
std
::
move
(
input_zero_point
);
...
...
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