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
6177d2b3
Commit
6177d2b3
authored
Jun 06, 2019
by
Shucai Xiao
Browse files
add an overload for function capture_arguments
parent
85e4d7ac
Changes
3
Hide whitespace changes
Inline
Side-by-side
Showing
3 changed files
with
11 additions
and
0 deletions
+11
-0
src/include/migraphx/quantization.hpp
src/include/migraphx/quantization.hpp
+1
-0
src/py/migraphx_py.cpp
src/py/migraphx_py.cpp
+4
-0
src/quantization.cpp
src/quantization.cpp
+6
-0
No files found.
src/include/migraphx/quantization.hpp
View file @
6177d2b3
...
@@ -21,6 +21,7 @@ void capture_arguments(program& prog,
...
@@ -21,6 +21,7 @@ void capture_arguments(program& prog,
const
std
::
vector
<
std
::
string
>&
ins_names
,
const
std
::
vector
<
std
::
string
>&
ins_names
,
std
::
function
<
void
(
std
::
size_t
,
std
::
vector
<
argument
>
)
>
func
);
std
::
function
<
void
(
std
::
size_t
,
std
::
vector
<
argument
>
)
>
func
);
void
capture_arguments
(
program
&
prog
,
const
std
::
vector
<
std
::
string
>&
ins_names
);
void
capture_arguments
(
program
&
prog
,
const
std
::
vector
<
std
::
string
>&
ins_names
);
void
capture_arguments
(
program
&
prog
);
void
quantize_int8
(
program
&
prog
);
void
quantize_int8
(
program
&
prog
);
void
quantize_int8
(
program
&
prog
,
const
std
::
vector
<
std
::
string
>&
ins_names
);
void
quantize_int8
(
program
&
prog
,
const
std
::
vector
<
std
::
string
>&
ins_names
);
...
...
src/py/migraphx_py.cpp
View file @
6177d2b3
...
@@ -202,6 +202,10 @@ PYBIND11_MODULE(migraphx, m)
...
@@ -202,6 +202,10 @@ PYBIND11_MODULE(migraphx, m)
migraphx
::
capture_arguments
(
p
,
ins_names
);
migraphx
::
capture_arguments
(
p
,
ins_names
);
});
});
m
.
def
(
"capture_arguments"
,
[](
migraphx
::
program
&
p
)
{
migraphx
::
capture_arguments
(
p
);
});
#ifdef HAVE_GPU
#ifdef HAVE_GPU
m
.
def
(
"allocate_gpu"
,
&
migraphx
::
gpu
::
allocate_gpu
,
py
::
arg
(
"s"
),
py
::
arg
(
"host"
)
=
false
);
m
.
def
(
"allocate_gpu"
,
&
migraphx
::
gpu
::
allocate_gpu
,
py
::
arg
(
"s"
),
py
::
arg
(
"host"
)
=
false
);
m
.
def
(
"to_gpu"
,
&
migraphx
::
gpu
::
to_gpu
,
py
::
arg
(
"arg"
),
py
::
arg
(
"host"
)
=
false
);
m
.
def
(
"to_gpu"
,
&
migraphx
::
gpu
::
to_gpu
,
py
::
arg
(
"arg"
),
py
::
arg
(
"host"
)
=
false
);
...
...
src/quantization.cpp
View file @
6177d2b3
...
@@ -407,5 +407,11 @@ void capture_arguments(program& prog, const std::vector<std::string>& ins_names)
...
@@ -407,5 +407,11 @@ void capture_arguments(program& prog, const std::vector<std::string>& ins_names)
capture_arguments
(
prog
,
ins_names
,
calc_quant_params
);
capture_arguments
(
prog
,
ins_names
,
calc_quant_params
);
}
}
void
capture_arguments
(
program
&
prog
)
{
std
::
vector
<
std
::
string
>
ins_names
=
{
"dot"
,
"convolution"
};
capture_arguments
(
prog
,
ins_names
);
}
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace MIGRAPHX_INLINE_NS
}
// namespace migraphx
}
// 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