[PyOV] Remove deprecated API (#16361)
This commit is contained in:
parent
a001f84cba
commit
8bfb6afd6a
@ -53,114 +53,4 @@ void regclass_passes_Manager(py::module m) {
|
||||
:param transformation: transformation instance.
|
||||
:type transformation: openvino.runtime.passes.PassBase
|
||||
)");
|
||||
|
||||
manager.def(
|
||||
"register_pass",
|
||||
[](ov::pass::Manager& self, const std::string& pass_name) -> void {
|
||||
Common::utils::deprecation_warning("register_pass(pass_name)",
|
||||
"",
|
||||
"Please use register_pass(ConstantFolding()) instead.");
|
||||
if (pass_name == "ConstantFolding") {
|
||||
self.register_pass<ov::pass::ConstantFolding>();
|
||||
}
|
||||
},
|
||||
py::arg("pass_name"),
|
||||
R"(
|
||||
This method is deprecated. Please use m.register_pass(ConstantFolding()) instead.
|
||||
|
||||
Register pass by name from the list of predefined passes.
|
||||
|
||||
:param pass_name: String to set the type of a pass.
|
||||
:type pass_name: str
|
||||
)");
|
||||
|
||||
manager.def(
|
||||
"register_pass",
|
||||
[](ov::pass::Manager& self,
|
||||
const std::string& pass_name,
|
||||
const FilePaths& file_paths,
|
||||
const std::string& version) -> void {
|
||||
Common::utils::deprecation_warning("register_pass(pass_name, output_files, version)",
|
||||
"",
|
||||
"Please use register_pass(Serialize(xml, bin, version)) instead.");
|
||||
if (pass_name == "Serialize") {
|
||||
self.register_pass<ov::pass::Serialize>(file_paths.first,
|
||||
file_paths.second,
|
||||
Common::utils::convert_to_version(version));
|
||||
}
|
||||
},
|
||||
py::arg("pass_name"),
|
||||
py::arg("output_files"),
|
||||
py::arg("version") = "UNSPECIFIED",
|
||||
R"(
|
||||
This method is deprecated. Please use m.register_pass(Serialize(...)) instead.
|
||||
|
||||
Set the type of register pass for pass manager.
|
||||
|
||||
:param pass_name: String to set the type of a pass.
|
||||
:type pass_name: str
|
||||
:param output_files: Tuple which contains paths where .xml and .bin files will be saved.
|
||||
:type output_files: Tuple[str, str]
|
||||
:param version: Sets the version of the IR which will be generated.
|
||||
Supported versions are:
|
||||
- "UNSPECIFIED" (default) : Use the latest or function version
|
||||
- "IR_V10" : v10 IR
|
||||
- "IR_V11" : v11 IR
|
||||
:type version: str
|
||||
|
||||
Examples
|
||||
----------
|
||||
1. Default Version
|
||||
pass_manager = Manager()
|
||||
pass_manager.register_pass("Serialize", output_files=("example.xml", "example.bin"))
|
||||
2. IR version 11
|
||||
pass_manager = Manager()
|
||||
pass_manager.register_pass("Serialize", output_files=("example.xml", "example.bin"), version="IR_V11")
|
||||
)");
|
||||
|
||||
manager.def(
|
||||
"register_pass",
|
||||
[](ov::pass::Manager& self,
|
||||
const std::string& pass_name,
|
||||
const std::string& xml_path,
|
||||
const std::string& bin_path,
|
||||
const std::string& version) -> void {
|
||||
Common::utils::deprecation_warning("register_pass(pass_name, xml_path, bin_path, version",
|
||||
"",
|
||||
"Please use register_pass(Serialize(xml, bin, version)) instead.");
|
||||
if (pass_name == "Serialize") {
|
||||
self.register_pass<ov::pass::Serialize>(xml_path, bin_path, Common::utils::convert_to_version(version));
|
||||
}
|
||||
},
|
||||
py::arg("pass_name"),
|
||||
py::arg("xml_path"),
|
||||
py::arg("bin_path"),
|
||||
py::arg("version") = "UNSPECIFIED",
|
||||
R"(
|
||||
This method is deprecated. Please use m.register_pass(Serialize(...)) instead.
|
||||
|
||||
Set the type of register pass for pass manager.
|
||||
|
||||
:param pass_name: String to set the type of a pass.
|
||||
:type pass_name: str
|
||||
:param xml_path: Path where *.xml file will be saved.
|
||||
:type xml_path: str
|
||||
:param bin_path: Path where *.bin file will be saved.
|
||||
:type bin_path: str
|
||||
:param version: Sets the version of the IR which will be generated.
|
||||
Supported versions are:
|
||||
- "UNSPECIFIED" (default) : Use the latest or function version
|
||||
- "IR_V10" : v10 IR
|
||||
- "IR_V11" : v11 IR
|
||||
:type version: str
|
||||
|
||||
Examples
|
||||
----------
|
||||
1. Default Version
|
||||
pass_manager = Manager()
|
||||
pass_manager.register_pass("Serialize", xml_path="example.xml", bin_path="example.bin")
|
||||
2. IR version 11
|
||||
pass_manager = Manager()
|
||||
pass_manager.register_pass("Serialize", xml_path="example.xml", bin_path="example.bin", version="IR_V11")
|
||||
)");
|
||||
}
|
||||
|
Loading…
Reference in New Issue
Block a user