Skip to content

Commit 1adbc6c

Browse files
committed
fix build issue.
Signed-off-by: xiping.yan <xiping.yan@intel.com>
1 parent 2b8db2d commit 1adbc6c

File tree

1 file changed

+2
-0
lines changed

1 file changed

+2
-0
lines changed

src/cpp/src/module_genai/modules/md_denoiser_loop/splitted_model_infer.cpp

Lines changed: 2 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -119,9 +119,11 @@ void CSplittedModelInfer::load_model(const std::string& model_path,
119119
properties_splitted_model[ov::weights_path.name()] =
120120
std::filesystem::path(path).replace_extension(".bin").string();
121121
auto cm = utils::singleton_core().compile_model(model, m_context, properties_splitted_model);
122+
# ifdef ENABLE_DYNAMIC_LOAD_MODEL_WEIGHTS
122123
// Release model weights after compilation to save GPU memory. Load weights again in infer() when
123124
// weights are needed.
124125
cm.release_model_weights();
126+
# endif
125127
m_compiled_models.push_back(std::move(cm));
126128
} else {
127129
m_compiled_models.push_back(

0 commit comments

Comments
 (0)