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
39422238
Commit
39422238
authored
Apr 18, 2019
by
Shucai Xiao
Browse files
refine the quantization function
parent
1b8cb243
Changes
1
Hide whitespace changes
Inline
Side-by-side
Showing
1 changed file
with
6 additions
and
2 deletions
+6
-2
src/quantization.cpp
src/quantization.cpp
+6
-2
No files found.
src/quantization.cpp
View file @
39422238
...
@@ -101,14 +101,18 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
...
@@ -101,14 +101,18 @@ void quantize(program& prog, const std::vector<std::string>& ins_names)
}
}
else
else
{
{
// check the dead code case to avoid assert
bool
output_empty
=
ins
->
outputs
().
empty
();
auto
ins_orig_type
=
auto
ins_orig_type
=
prog
.
insert_instruction
(
std
::
next
(
ins
),
op
::
convert
{
orig_type
},
ins
);
prog
.
insert_instruction
(
std
::
next
(
ins
),
op
::
convert
{
orig_type
},
ins
);
prog
.
replace_instruction
(
ins
,
ins_orig_type
);
if
(
!
output_empty
)
{
prog
.
replace_instruction
(
ins
,
ins_orig_type
);
}
}
}
}
}
prog
.
replace_instruction
(
ins
,
op
,
converted_inputs
);
prog
.
replace_instruction
(
ins
,
op
,
converted_inputs
);
// instruction::replace(ins, op, compute_shape(op, converted_inputs), converted_inputs);
}
}
}
}
}
}
...
...
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