diff --git a/model_analyzer/openvino_core_service.py b/model_analyzer/openvino_core_service.py index 7e318d8..8c6131a 100644 --- a/model_analyzer/openvino_core_service.py +++ b/model_analyzer/openvino_core_service.py @@ -5,6 +5,7 @@ # pylint: disable=import-error from openvino.runtime import CompiledModel, Core, Model +from openvino.runtime.passes import ConstantFolding from openvino.runtime.passes import Manager @@ -35,7 +36,7 @@ def compile_model(self, model: Model, device: str) -> CompiledModel: def pass_constant_folding(model: Model): try: pass_manager = Manager() - pass_manager.register_pass('ConstantFolding') + pass_manager.register_pass(ConstantFolding()) pass_manager.set_per_pass_validation(False) pass_manager.run_passes(model) # pylint: disable=broad-except