Commit 6177d2b3 authored by Shucai Xiao's avatar Shucai Xiao
Browse files

add an overload for function capture_arguments

parent 85e4d7ac
...@@ -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);
......
...@@ -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);
......
...@@ -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
Markdown is supported
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment