Skip to content

OpenVINO™ is an open source toolkit for optimizing and deploying AI inference

[intel-npu] Publishing NPU_DEFER_WEIGHTS_LOAD property (#27790)

Attila Csok9706b78eac17
diff --git a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rst b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rst
index 7b135fa7ff0..436d383ebf7 100644
--- a/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rst
+++ b/docs/articles_en/openvino-workflow/running-inference/inference-devices-and-modes/npu-device.rst
@@ -146,6 +146,8 @@ offer a limited set of supported OpenVINO features.
ov::intel_npu::turbo
ov::intel_npu::tiles
ov::intel_npu::max_tiles
+ ov::intel_npu::bypass_umd_caching
+ ov::intel_npu::defer_weights_load
.. tab-item:: Read-only properties
@@ -168,7 +170,6 @@ offer a limited set of supported OpenVINO features.
ov::intel_npu::device_alloc_mem_size
ov::intel_npu::device_total_mem_size
ov::intel_npu::driver_version
- ov::intel_npu::bypass_umd_caching
.. note::
diff --git a/src/inference/include/openvino/runtime/intel_npu/properties.hpp b/src/inference/include/openvino/runtime/intel_npu/properties.hpp
index 49416f61b8b..8734757da1d 100644
--- a/src/inference/include/openvino/runtime/intel_npu/properties.hpp
+++ b/src/inference/include/openvino/runtime/intel_npu/properties.hpp
@@ -95,5 +95,12 @@ static constexpr ov::Property<int64_t> max_tiles{"NPU_MAX_TILES"};
*/
static constexpr ov::Property<bool> bypass_umd_caching{"NPU_BYPASS_UMD_CACHING"};
+/**
+ * @brief [Only for NPU Plugin]
+ * Type: boolean, default is false
+ * This option allows to delay loading the weights until inference is created
+ */
+static constexpr ov::Property<bool> defer_weights_load{"NPU_DEFER_WEIGHTS_LOAD"};
+
} // namespace intel_npu
} // namespace ov
diff --git a/src/plugins/intel_npu/README.md b/src/plugins/intel_npu/README.md
index 980faa71a15..89aa29de9f1 100644
--- a/src/plugins/intel_npu/README.md
+++ b/src/plugins/intel_npu/README.md
@@ -176,6 +176,7 @@ The following properties are supported:
| `ov::intel_npu::tiles`/</br>`NPU_TILES` | RW | Sets the number of npu tiles to compile the model for | `[0-]` | `-1` |
| `ov::intel_npu::max_tiles`/</br>`NPU_MAX_TILES` | RW | Maximum number of tiles supported by the device we compile for. Can be set for offline compilation. If not set, it will be populated by driver.| `[0-]` | `[1-6] depends on npu platform` |
| `ov::intel_npu::bypass_umd_caching`/</br>`NPU_BYPASS_UMD_CACHING` | RW | Bypass the caching of compiled models in UMD. | `YES`/ `NO`| `NO` |
+| `ov::intel_npu::defer_weights_load`/</br>`NPU_DEFER_WEIGHTS_LOAD` | RW | Delay loading the weights until inference is created. | `YES`/ `NO`| `NO` |
&nbsp;
### Performance Hint: Default Number of DPU Groups / DMA Engines
diff --git a/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp b/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
index 8aabd132e94..15bbd69483b 100644
--- a/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
+++ b/src/plugins/intel_npu/src/al/include/intel_npu/npu_private_properties.hpp
@@ -305,13 +305,6 @@ static constexpr ov::Property<BatchMode> batch_mode{"NPU_BATCH_MODE"};
*/
static constexpr ov::Property<int64_t> create_executor{"NPU_CREATE_EXECUTOR"};
-/**
- * @brief [Only for NPU Plugin]
- * Type: boolean, default is false
- * This option allows to omit loading the weights until inference is created
- */
-static constexpr ov::Property<bool> defer_weights_load{"NPU_DEFER_WEIGHTS_LOAD"};
-
/**
* @brief Read-only property to get the name of used backend
*/
diff --git a/src/plugins/intel_npu/src/plugin/src/plugin.cpp b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
index 18a96bff02f..a57628c2e45 100644
--- a/src/plugins/intel_npu/src/plugin/src/plugin.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
@@ -489,6 +489,12 @@ Plugin::Plugin()
[](const Config& config) {
return config.get<BYPASS_UMD_CACHING>();
}}},
+ {ov::intel_npu::defer_weights_load.name(),
+ {true,
+ ov::PropertyMutability::RW,
+ [](const Config& config) {
+ return config.get<DEFER_WEIGHTS_LOAD>();
+ }}},
// NPU Private
// =========
{ov::intel_npu::dma_engines.name(),
@@ -544,12 +550,6 @@ Plugin::Plugin()
[](const Config& config) {
return config.get<CREATE_EXECUTOR>();
}}},
- {ov::intel_npu::defer_weights_load.name(),
- {false,
- ov::PropertyMutability::RW,
- [](const Config& config) {
- return config.get<DEFER_WEIGHTS_LOAD>();
- }}},
{ov::intel_npu::dynamic_shape_to_static.name(),
{false,
ov::PropertyMutability::RW,