From 73fd56405c1adbf28625e1bbe715f721bb3fa960 Mon Sep 17 00:00:00 2001 From: "Anastasiya(Asya) Pronina" Date: Tue, 7 Jan 2025 09:45:46 +0100 Subject: [PATCH] Replace 'CACHE_DIR' with 'NPUW_CACHE_DIR' in StatefulLLMPipeline (#1489) Handle `CACHE_DIR` in `StatefulLLMPipeline` the same way as in `StatelessLLMPipeline` --- src/cpp/src/llm_pipeline_static.cpp | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/src/cpp/src/llm_pipeline_static.cpp b/src/cpp/src/llm_pipeline_static.cpp index 94aa6e19fe..c98b571179 100644 --- a/src/cpp/src/llm_pipeline_static.cpp +++ b/src/cpp/src/llm_pipeline_static.cpp @@ -739,7 +739,10 @@ std::shared_ptr StatefulLLMPipeline::setupAndCompileModel( rename_key(pipeline_config, "PREFILL_CONFIG", "NPUW_LLM_PREFILL_CONFIG"); rename_key(pipeline_config, "GENERATE_CONFIG", "NPUW_LLM_GENERATE_CONFIG"); - + + // Replace CACHE_DIR option if NPUW is enabled + set_npuw_cache_dir(pipeline_config); + return std::make_shared(genai::utils::singleton_core().compile_model(model, "NPU", pipeline_config)); }