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
d096e06a
Commit
d096e06a
authored
Apr 16, 2019
by
Shucai Xiao
Browse files
clang format
parent
d95143d5
Changes
2
Show whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
4 additions
and
6 deletions
+4
-6
src/include/migraphx/instruction.hpp
src/include/migraphx/instruction.hpp
+1
-3
src/quantize_ins.cpp
src/quantize_ins.cpp
+3
-3
No files found.
src/include/migraphx/instruction.hpp
View file @
d096e06a
...
@@ -67,9 +67,7 @@ struct instruction
...
@@ -67,9 +67,7 @@ struct instruction
static
void
backreference
(
instruction_ref
ref
);
static
void
backreference
(
instruction_ref
ref
);
static
void
replace_argument
(
instruction_ref
ins
,
static
void
replace_argument
(
instruction_ref
ins
,
instruction_ref
old
,
instruction_ref
new_ins
);
instruction_ref
old
,
instruction_ref
new_ins
);
static
void
static
void
replace
(
instruction_ref
ins
,
operation
o
,
const
shape
&
r
,
std
::
vector
<
instruction_ref
>
args
);
replace
(
instruction_ref
ins
,
operation
o
,
const
shape
&
r
,
std
::
vector
<
instruction_ref
>
args
);
...
...
src/quantize_ins.cpp
View file @
d096e06a
...
@@ -78,7 +78,7 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
...
@@ -78,7 +78,7 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
{
{
input_fp16
=
insert_fp16
(
prog
,
input
,
shape
::
half_type
,
map_fp16
);
input_fp16
=
insert_fp16
(
prog
,
input
,
shape
::
half_type
,
map_fp16
);
}
}
//instruction::replace_argument(ins, input, input_fp16, false);
//
instruction::replace_argument(ins, input, input_fp16, false);
converted_inputs
.
push_back
(
input_fp16
);
converted_inputs
.
push_back
(
input_fp16
);
}
}
else
else
...
@@ -87,13 +87,13 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
...
@@ -87,13 +87,13 @@ void quantize_ins(program& prog, const std::vector<std::string>& ins_names)
}
}
}
}
if
(
inputs
!=
converted_inputs
)
if
(
inputs
!=
converted_inputs
)
{
{
auto
op
=
ins
->
get_operator
();
auto
op
=
ins
->
get_operator
();
instruction
::
replace
(
ins
,
op
,
compute_shape
(
op
,
converted_inputs
),
converted_inputs
);
instruction
::
replace
(
ins
,
op
,
compute_shape
(
op
,
converted_inputs
),
converted_inputs
);
}
}
if
(
ins
->
get_shape
().
type
()
!=
orig_type
)
if
(
ins
->
get_shape
().
type
()
!=
orig_type
)
{
{
// insert another fp_conversion instruction to convert it back
// insert another fp_conversion instruction to convert it back
if
(
ins
==
std
::
prev
(
prog
.
end
()))
if
(
ins
==
std
::
prev
(
prog
.
end
()))
...
...
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