Skip to content

Commit 579354f

Browse files
Implementing the export path
1 parent ae5a2f3 commit 579354f

File tree

4 files changed

+9
-8
lines changed

4 files changed

+9
-8
lines changed

src/plugins/intel_npu/src/common/include/intel_npu/common/igraph.hpp

+2
Original file line numberDiff line numberDiff line change
@@ -63,6 +63,8 @@ class IGraph : public std::enable_shared_from_this<IGraph> {
6363

6464
const std::optional<std::size_t> get_batch_size() const;
6565

66+
size_t get_blob_size() const;
67+
6668
std::vector<uint8_t> _blob;
6769

6870
protected:

src/plugins/intel_npu/src/common/src/igraph.cpp

+4
Original file line numberDiff line numberDiff line change
@@ -157,4 +157,8 @@ const std::optional<std::size_t> IGraph::get_batch_size() const {
157157
return _batch_size;
158158
}
159159

160+
size_t IGraph::get_blob_size() const {
161+
return _blobPtr->size();
162+
}
163+
160164
} // namespace intel_npu

src/plugins/intel_npu/src/compiler_adapter/src/driver_compiler_adapter.cpp

-7
Original file line numberDiff line numberDiff line change
@@ -412,13 +412,6 @@ std::vector<std::shared_ptr<IGraph>> DriverCompilerAdapter::compileWS(const std:
412412

413413
const ze_graph_compiler_version_info_t& compilerVersion = _compilerProperties.compilerVersion;
414414

415-
if ((compilerVersion.major < 6) || (compilerVersion.major == 6 && compilerVersion.minor < 3)) {
416-
OPENVINO_THROW("Minimum compiler version required for weights separation: 6.3. Found: ",
417-
compilerVersion.major,
418-
".",
419-
compilerVersion.minor);
420-
}
421-
422415
const auto maxOpsetVersion = _compilerProperties.maxOVOpsetVersionSupported;
423416
_logger.info("getSupportedOpsetVersion Max supported version of opset in CiD: %d", maxOpsetVersion);
424417

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

+3-1
Original file line numberDiff line numberDiff line change
@@ -130,7 +130,9 @@ void CompiledModel::export_model(std::ostream& stream) const {
130130
}
131131

132132
size_t blobSizeBeforeVersioning = _graph->export_blob(stream);
133-
auto meta = Metadata<CURRENT_METADATA_VERSION>(blobSizeBeforeVersioning, CURRENT_OPENVINO_VERSION);
133+
auto meta = Metadata<CURRENT_METADATA_VERSION>(blobSizeBeforeVersioning,
134+
CURRENT_OPENVINO_VERSION,
135+
{_initGraph->get_blob_size()});
134136
meta.write(stream);
135137
}
136138

0 commit comments

Comments
 (0)