Skip to content

Commit

Permalink
Release networkStorage and compiledNetwork for import_model path
Browse files Browse the repository at this point in the history
  • Loading branch information
MirceaDan99 committed Oct 29, 2024
1 parent 2e081c0 commit 8b996c3
Show file tree
Hide file tree
Showing 6 changed files with 103 additions and 189 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,7 @@ class ZeGraphExtWrappers final : public ZeGraphExtWrappersInterface {

void setGraphArgumentValue(ze_graph_handle_t graphHandle, uint32_t argi_, const void* argv) const override;

void initializeGraph(ze_graph_handle_t graphHandle, const Config& config) const override;
void initializeGraph(ze_graph_handle_t graphHandle, const Config& config, std::optional<std::vector<uint8_t>> /* unusedBlobOpt */) const override;

private:
template <ze_graph_ext_version_t T = TableExtension, std::enable_if_t<!NotSupportQuery(T), bool> = true>
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -34,7 +34,7 @@ class ZeGraphExtWrappersInterface {

virtual void setGraphArgumentValue(ze_graph_handle_t graphHandle, uint32_t argi_, const void* argv) const = 0;

virtual void initializeGraph(ze_graph_handle_t graphHandle, const Config& config) const = 0;
virtual void initializeGraph(ze_graph_handle_t graphHandle, const Config& config, std::optional<std::vector<uint8_t>> blobOpt) const = 0;

virtual ~ZeGraphExtWrappersInterface() = default;
};
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -117,7 +117,7 @@ void DriverGraph::initialize(const Config& config) {
set_workload_type(config.get<WORKLOAD_TYPE>());
}

_zeGraphExt->initializeGraph(_handle, config);
_zeGraphExt->initializeGraph(_handle, config, std::move(blob));

_logger.debug("Graph initialize finish");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ void PluginGraph::initialize(const Config& config) {
set_workload_type(config.get<WORKLOAD_TYPE>());
}

_zeGraphExt->initializeGraph(_handle, config);
_zeGraphExt->initializeGraph(_handle, config, std::move(blob));

_logger.debug("Graph initialize finish");
}
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,7 @@ void ZeGraphExtWrappers<TableExtension>::setGraphArgumentValue(ze_graph_handle_t
}

template <ze_graph_ext_version_t TableExtension>
void ZeGraphExtWrappers<TableExtension>::initializeGraph(ze_graph_handle_t graphHandle, const Config& config) const {
void ZeGraphExtWrappers<TableExtension>::initializeGraph(ze_graph_handle_t graphHandle, const Config& config, std::optional<std::vector<uint8_t>> /* unusedBlob */) const {
if (_zeroInitStruct->getGraphDdiTable().version() < ZE_GRAPH_EXT_VERSION_1_8) {
initialize_graph_through_command_list(graphHandle, config);
} else {
Expand Down
Loading

0 comments on commit 8b996c3

Please sign in to comment.