Skip to content

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

[NPUW]Add MOE caching properties to NPU plugin (#34648)

intelgaoxiong80e83d3be89e
diff --git a/src/plugins/intel_npu/src/plugin/include/properties.hpp b/src/plugins/intel_npu/src/plugin/include/properties.hpp
index 9320b2f471b..cd6e1313afd 100644
--- a/src/plugins/intel_npu/src/plugin/include/properties.hpp
+++ b/src/plugins/intel_npu/src/plugin/include/properties.hpp
@@ -182,6 +182,8 @@ private:
ov::intel_npu::npuw::partitioning::dcoff_type.name(),
ov::intel_npu::npuw::partitioning::dcoff_with_scale.name(),
ov::intel_npu::npuw::partitioning::funcall_for_all.name(),
+ ov::intel_npu::npuw::partitioning::moe_token_chunk_size.name(),
+ ov::intel_npu::npuw::partitioning::moe_pool_size.name(),
ov::intel_npu::npuw::funcall_async.name(),
ov::intel_npu::npuw::unfold_ireqs.name(),
ov::intel_npu::npuw::fallback_exec.name(),
@@ -211,7 +213,9 @@ private:
ov::intel_npu::npuw::llm::shared_lm_head_config.name(),
ov::intel_npu::npuw::llm::additional_shared_lm_head_config.name(),
ov::intel_npu::npuw::llm::optimize_fp8.name(),
- ov::intel_npu::npuw::eagle::enabled.name()};
+ ov::intel_npu::npuw::eagle::enabled.name(),
+ ov::intel_npu::npuw::llm::prefill_moe_hint.name(),
+ ov::intel_npu::npuw::llm::generate_moe_hint.name()};
const std::vector<ov::PropertyName> _internalSupportedProperties = {ov::internal::caching_properties.name(),
ov::internal::caching_with_mmap.name(),
diff --git a/src/plugins/intel_npu/src/plugin/src/plugin.cpp b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
index 1bd382b1a11..c603ee8d2e4 100644
--- a/src/plugins/intel_npu/src/plugin/src/plugin.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/plugin.cpp
@@ -340,6 +340,8 @@ void init_config(const IEngineBackend* backend, OptionsDesc& options, FilteredCo
REGISTER_OPTION(NPUW_KOKORO);
REGISTER_OPTION(NPUW_KOKORO_BLOCK_SIZE);
REGISTER_OPTION(NPUW_KOKORO_OVERLAP_SIZE);
+ REGISTER_OPTION(NPUW_MOE_TOKEN_CHUNK_SIZE);
+ REGISTER_OPTION(NPUW_MOE_POOL_SIZE);
config.enableRuntimeOptions();
diff --git a/src/plugins/intel_npu/src/plugin/src/properties.cpp b/src/plugins/intel_npu/src/plugin/src/properties.cpp
index b14bac4ba65..e073b2decd0 100644
--- a/src/plugins/intel_npu/src/plugin/src/properties.cpp
+++ b/src/plugins/intel_npu/src/plugin/src/properties.cpp
@@ -659,6 +659,8 @@ void Properties::registerPluginProperties() {
TRY_REGISTER_SIMPLE_PROPERTY(ov::intel_npu::npuw::kokoro::enabled, NPUW_KOKORO);
TRY_REGISTER_SIMPLE_PROPERTY(ov::intel_npu::npuw::kokoro::block_size, NPUW_KOKORO_BLOCK_SIZE);
TRY_REGISTER_SIMPLE_PROPERTY(ov::intel_npu::npuw::kokoro::overlap_size, NPUW_KOKORO_OVERLAP_SIZE);
+ TRY_REGISTER_SIMPLE_PROPERTY(ov::intel_npu::npuw::partitioning::moe_token_chunk_size, NPUW_MOE_TOKEN_CHUNK_SIZE);
+ TRY_REGISTER_SIMPLE_PROPERTY(ov::intel_npu::npuw::partitioning::moe_pool_size, NPUW_MOE_POOL_SIZE);
// 2. Metrics (static device and enviroment properties)
// ========
diff --git a/src/plugins/intel_npu/tests/functional/internal/plugin/test_properties.hpp b/src/plugins/intel_npu/tests/functional/internal/plugin/test_properties.hpp
index 399b092712b..5f07b5b2262 100644
--- a/src/plugins/intel_npu/tests/functional/internal/plugin/test_properties.hpp
+++ b/src/plugins/intel_npu/tests/functional/internal/plugin/test_properties.hpp
@@ -247,6 +247,8 @@ public:
REGISTER_OPTION(NPUW_KOKORO);
REGISTER_OPTION(NPUW_KOKORO_BLOCK_SIZE);
REGISTER_OPTION(NPUW_KOKORO_OVERLAP_SIZE);
+ REGISTER_OPTION(NPUW_MOE_TOKEN_CHUNK_SIZE);
+ REGISTER_OPTION(NPUW_MOE_POOL_SIZE);
npu_config.enableRuntimeOptions();