Skip to content

Commit

Permalink
Fix propagating weights path data to all serialized constants
Browse files Browse the repository at this point in the history
  • Loading branch information
tkrupa-intel committed Sep 4, 2024
1 parent 1b1abbc commit 81a9ff3
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 7 deletions.
6 changes: 5 additions & 1 deletion src/plugins/intel_gpu/src/graph/program.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -1739,9 +1739,13 @@ void program::save(cldnn::BinaryOutputBuffer& ob) const {
continue;
} else {
node.second->as<data>().typed_desc()->mem = data_node.get_attached_memory_ptr();
node.second->as<data>().typed_desc()->weights_path = weights_path;
}
}

if (node.second->is_type<data>()) {
node.second->as<data>().typed_desc()->weights_path = weights_path;
}

ob << true;

ob << node.second->desc;
Expand Down
7 changes: 1 addition & 6 deletions src/plugins/intel_gpu/src/plugin/plugin.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -204,12 +204,7 @@ std::shared_ptr<ov::ICompiledModel> Plugin::compile_model(const std::shared_ptr<
config.set_user_property(orig_config);
config.apply_user_properties(context_impl->get_engine().get_device_info());

auto rt_info = model->get_rt_info();
auto weights_path = rt_info.find("weights_path");
if (weights_path != rt_info.end()) {
ov::AnyMap weights_path_property{{"GPU_WEIGHTS_PATH", weights_path->second}};
config.set_property(weights_path_property);
}
set_cache_info(model, config);

auto transformed_model = clone_and_transform_model(model, config, context_impl);
return std::make_shared<CompiledModel>(transformed_model, shared_from_this(), context_impl, config);
Expand Down

0 comments on commit 81a9ff3

Please sign in to comment.