Skip to content

Commit 613dd45

Browse files
committed
Export init and main separately
1 parent ad4e1de commit 613dd45

File tree

3 files changed

+10
-2
lines changed

3 files changed

+10
-2
lines changed

src/plugins/intel_npu/src/plugin/include/compiled_model.hpp

+1
Original file line numberDiff line numberDiff line change
@@ -79,6 +79,7 @@ class CompiledModel final : public ICompiledModel {
7979
std::map<std::string, std::tuple<bool, ov::PropertyMutability, std::function<ov::Any(const Config&)>>> _properties;
8080
std::vector<ov::PropertyName> _supportedProperties;
8181

82+
// mutable bool exportInitFlag = false;
8283
std::shared_ptr<IGraph> _graph;
8384
std::shared_ptr<IGraph> _initGraph;
8485
std::shared_ptr<ov::Model> _initModel;

src/plugins/intel_npu/src/plugin/src/compiled_model.cpp

+8-1
Original file line numberDiff line numberDiff line change
@@ -127,7 +127,14 @@ void CompiledModel::export_model(std::ostream& stream) const {
127127
_graph->custom_export(stream, _initGraph, _initModel);
128128
return;
129129
}
130-
_graph->export_blob(stream);
130+
131+
// DEBUG EXPORT
132+
// if (!exportInitFlag) {
133+
// _graph->export_blob(stream);
134+
// exportInitFlag = true;
135+
// } else {
136+
// _initGraph->export_blob(stream);
137+
// }
131138
}
132139

133140
std::shared_ptr<const ov::Model> CompiledModel::get_runtime_model() const {

src/plugins/intel_npu/tools/compile_tool/main.cpp

+1-1
Original file line numberDiff line numberDiff line change
@@ -481,7 +481,7 @@ int main(int argc, char* argv[]) {
481481
compiledModel.export_model(outputFile);
482482
}
483483

484-
// DEBUG
484+
// DEBUG EXPORT
485485
// {
486486
// std::string outputInitName = outputName.substr(0, outputName.size()-5) + "_init.blob";
487487
// std::ofstream outputInitFile{outputInitName, std::ios::out | std::ios::binary};

0 commit comments

Comments
 (0)