Skip to content
GitLab
Menu
Projects
Groups
Snippets
Loading...
Help
Help
Support
Community forum
Keyboard shortcuts
?
Submit feedback
Contribute to GitLab
Sign in / Register
Toggle navigation
Menu
Open sidebar
gaoqiong
MIGraphX
Commits
e12f20bb
Commit
e12f20bb
authored
Apr 10, 2023
by
Alan Turner
Browse files
Formatting
parent
9f48c99e
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
4 additions
and
5 deletions
+4
-5
src/rewrite_quantization.cpp
src/rewrite_quantization.cpp
+4
-5
No files found.
src/rewrite_quantization.cpp
View file @
e12f20bb
...
...
@@ -35,8 +35,8 @@ inline namespace MIGRAPHX_INLINE_NS {
void
apply_quantizelinear
(
module
&
m
,
instruction_ref
ins
)
{
assert
(
ins
->
name
()
==
"quantizelinear"
);
auto
x
=
ins
->
inputs
()[
0
];
auto
y_scale
=
ins
->
inputs
()[
1
];
auto
x
=
ins
->
inputs
()[
0
];
auto
y_scale
=
ins
->
inputs
()[
1
];
auto
target_type
=
y_scale
->
get_shape
().
type
();
if
(
x
->
get_shape
().
type
()
!=
y_scale
->
get_shape
().
type
())
...
...
@@ -73,11 +73,10 @@ void apply_quantizelinear(module& m, instruction_ref ins)
void
apply_dequantizelinear
(
module
&
m
,
instruction_ref
ins
)
{
assert
(
ins
->
name
()
==
"dequantizelinear"
);
auto
x_scale
=
ins
->
inputs
()[
1
];
auto
x_scale
=
ins
->
inputs
()[
1
];
auto
target_type
=
x_scale
->
get_shape
().
type
();
auto
x
=
m
.
insert_instruction
(
auto
x
=
m
.
insert_instruction
(
ins
,
make_op
(
"convert"
,
{{
"target_type"
,
target_type
}}),
ins
->
inputs
()[
0
]);
if
(
ins
->
inputs
().
size
()
==
3
)
{
...
...
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