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
61a1c018
"vscode:/vscode.git/clone" did not exist on "1fc053d57adc5514e67f252f27e05c7535c0fdf8"
Commit
61a1c018
authored
Apr 08, 2019
by
Shucai Xiao
Browse files
add a function to quantize a specific instruction
parent
5482a441
Changes
2
Hide whitespace changes
Inline
Side-by-side
Showing
2 changed files
with
46 additions
and
0 deletions
+46
-0
src/include/migraphx/quantize_ins.hpp
src/include/migraphx/quantize_ins.hpp
+20
-0
src/quantize_ins.cpp
src/quantize_ins.cpp
+26
-0
No files found.
src/include/migraphx/quantize_ins.hpp
0 → 100644
View file @
61a1c018
#ifndef MIGRAPHX_GUARD_RTGLIB_QUANTIZE_INS_HPP
#define MIGRAPHX_GUARD_RTGLIB_QUANTIZE_INS_HPP
#include <string>
#include <vector>
#include <migraphx/instruction_ref.hpp>
#include <migraphx/operation.hpp>
#include <migraphx/config.hpp>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
struct
program
;
void
quantize_ins
(
program
&
prog
,
const
std
::
vector
<
std
::
string
>&
ins_names
);
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
#endif
src/quantize_ins.cpp
0 → 100644
View file @
61a1c018
#include <migraphx/quantize_ins.hpp>
#include <migraphx/program.hpp>
#include <migraphx/instruction.hpp>
#include <migraphx/iterator_for.hpp>
#include <migraphx/stringutils.hpp>
#include <utility>
namespace
migraphx
{
inline
namespace
MIGRAPHX_INLINE_NS
{
void
quantize_ins
(
program
&
prog
,
const
std
::
vector
<
std
::
string
>&
ins_names
)
{
for
(
auto
ins
:
iterator_for
(
prog
))
{
auto
name_it
=
std
::
find
(
ins_name
.
begin
(),
ins_name
.
end
(),
ins
->
name
());
if
(
name_it
==
ins_name
.
end
())
{
continue
;
}
}
}
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
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