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
9174d78f
Commit
9174d78f
authored
Apr 09, 2019
by
Shucai Xiao
Browse files
clang format
parent
4d18329c
Changes
1
Show whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
11 additions
and
11 deletions
+11
-11
src/quantize_ins.cpp
src/quantize_ins.cpp
+11
-11
No files found.
src/quantize_ins.cpp
View file @
9174d78f
...
...
@@ -9,8 +9,7 @@
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
instruction_ref
insert_fp16
(
program
&
prog
,
instruction_ref
insert_fp16
(
program
&
prog
,
instruction_ref
&
ins
,
shape
::
type_t
type
,
std
::
unordered_map
<
instruction_ref
,
instruction_ref
>&
map_fp16
)
...
...
@@ -59,7 +58,7 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
// if the input is a fp_conversion operator, uses its input
// as its current input
instruction_ref
input_fp16
{};
if
(
input
->
name
()
==
"fp_conversion"
)
if
(
input
->
name
()
==
"fp_conversion"
)
{
input_fp16
=
input
->
inputs
().
front
();
}
...
...
@@ -78,13 +77,14 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
if
(
ins
->
get_shape
().
type
()
!=
orig_type
)
{
instruction_ref
ins_orig_type
{};
if
(
ins
==
std
::
prev
(
prog
.
end
()))
if
(
ins
==
std
::
prev
(
prog
.
end
()))
{
ins_orig_type
=
prog
.
add_instruction
(
op
::
fp_conversion
{
orig_type
},
ins
);
}
else
{
ins_orig_type
=
prog
.
insert_instruction
(
std
::
next
(
ins
),
op
::
fp_conversion
{
orig_type
},
ins
);
ins_orig_type
=
prog
.
insert_instruction
(
std
::
next
(
ins
),
op
::
fp_conversion
{
orig_type
},
ins
);
}
prog
.
replace_instruction
(
ins
,
ins_orig_type
);
...
...
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