{"id":3725,"library":"openvino","title":"OpenVINO Runtime","description":"OpenVINO™ Runtime is an open-source toolkit for optimizing and deploying AI inference. It enables developers to deploy pre-trained deep learning models through a unified API on a variety of Intel hardware (CPUs, GPUs, NPUs, VPUs, etc.). The current version is 2026.1.0, with major releases typically following a quarterly or semi-annual cadence, aligning with Intel product releases.","status":"active","version":"2026.1.0","language":"en","source_language":"en","source_url":"https://github.com/openvinotoolkit/openvino","tags":["AI","inference","deep learning","computer vision","edge AI","machine learning","intel"],"install":[{"cmd":"pip install openvino","lang":"bash","label":"Stable release"}],"dependencies":[],"imports":[{"note":"The openvino.inference_engine module was deprecated and removed in favor of openvino.runtime since OpenVINO 2022.1.","wrong":"from openvino.inference_engine import IECore","symbol":"Core","correct":"from openvino.runtime import Core"},{"note":"The openvino.inference_engine module was deprecated and removed in favor of openvino.runtime since OpenVINO 2022.1.","wrong":"from openvino.inference_engine import Tensor","symbol":"Tensor","correct":"from openvino.runtime import Tensor"},{"note":"Used for programmatic model creation or manipulation. Models are typically loaded from files using Core.read_model().","symbol":"Model","correct":"from openvino.runtime import Model"},{"note":"Used for specifying data types in model creation or tensor handling.","symbol":"Type","correct":"from openvino.runtime import Type"},{"note":"Provides access to OpenVINO operations for programmatic model construction using opset12.","symbol":"opset12","correct":"import openvino.runtime.opset12 as ov_ops"}],"quickstart":{"code":"import openvino.runtime as ov\nimport numpy as np\nimport os\n\n# 1. Create a Core object to manage devices and models\ncore = ov.Core()\n\n# 2. Create a dummy model for demonstration\n# In a real scenario, you would load from .xml/.bin using: \n# model = core.read_model(\"path/to/model.xml\")\ninput_shape = [1, 3, 224, 224] # Batch, Channels, Height, Width\noutput_shape = [1, 1000] # Batch, Class_count\n\ninput_node = ov.opset12.parameter(input_shape, ov.Type.f32, name=\"input\")\noutput_node = ov.opset12.result(input_node) # Simple identity model\nmodel = ov.Model([output_node], [input_node], \"dummy_model\")\n\n# 3. Compile the model for a specific device\n# Use os.environ.get for dynamic device selection in production\ndevice = os.environ.get(\"OPENVINO_DEVICE\", \"CPU\") # Example: \"GPU\", \"NPU\"\nprint(f\"Compiling model for device: {device}\")\ncompiled_model = core.compile_model(model, device)\n\n# 4. Create an inference request\ninfer_request = compiled_model.create_infer_request()\n\n# 5. Prepare input data (random data for dummy model)\ninput_data = np.random.rand(*input_shape).astype(np.float32)\ninfer_request.set_input_tensor(ov.Tensor(input_data))\n\n# 6. Perform inference\ninfer_request.infer()\n\n# 7. Get output data\noutput_tensor = infer_request.get_output_tensor()\noutput_data = output_tensor.data\n\nprint(f\"Inference successful. Output shape: {output_data.shape}\")\nprint(f\"First 5 output values: {output_data.flatten()[:5]}\")","lang":"python","description":"This quickstart demonstrates how to initialize the OpenVINO Runtime, create a simple dummy model programmatically (or load a real one), compile it for a specific device (defaults to CPU), run inference with random input data, and retrieve the output. Remember to replace the dummy model creation with actual model loading in a real application."},"warnings":[{"fix":"Update all imports and class instantiations from `openvino.inference_engine.*` to `openvino.runtime.*` (e.g., `IECore` becomes `Core`, `IENetwork` becomes `Model`). Consult migration guides for detailed changes.","message":"Major API overhaul: The `openvino.inference_engine` module and its classes (e.g., `IECore`, `IENetwork`, `IEPlugin`, `Tensor`) were deprecated and subsequently removed in favor of `openvino.runtime` in OpenVINO 2022.x.","severity":"breaking","affected_versions":"OpenVINO 2022.1 and newer"},{"fix":"Always explicitly specify the target device during model compilation (e.g., `core.compile_model(model, device='GPU')`). Use `core.available_devices` to check which devices are detected and available on the system.","message":"Device availability and selection: OpenVINO often defaults to 'CPU' if no device is specified or if the specified device is unavailable. Users might expect automatic GPU or NPU usage without explicit configuration.","severity":"gotcha","affected_versions":"All versions"},{"fix":"When encountering issues with older models, try re-exporting them using the latest OpenVINO Model Optimizer. Ensure your model optimization pipeline matches your OpenVINO Runtime version.","message":"Intermediate Representation (IR) version changes: OpenVINO's internal model format (IR) has evolved (e.g., from IR v7 to IR v10). While `core.read_model` typically handles conversion for recent versions, very old `.xml` / `.bin` models might not load or behave as expected.","severity":"breaking","affected_versions":"Especially prior to OpenVINO 2023.0"},{"fix":"Upgrade your Python environment to version 3.10 or higher. For older Python versions, you may need to use an older OpenVINO release (e.g., OpenVINO 2024.x supports Python 3.8-3.11).","message":"Python 3.9 and older are no longer supported. The `openvino` package now requires Python 3.10 or newer.","severity":"breaking","affected_versions":"OpenVINO 2026.1.0 and newer"}],"env_vars":null,"last_verified":"2026-04-11T00:00:00.000Z","next_check":"2026-07-10T00:00:00.000Z"}