forked from openvinotoolkit/openvino
-
Notifications
You must be signed in to change notification settings - Fork 0
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- Loading branch information
1 parent
2b4eb76
commit 8dc01b8
Showing
10 changed files
with
148 additions
and
31 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
44 changes: 44 additions & 0 deletions
44
src/plugins/intel_npu/src/compiler/include/iexternal_compiler.hpp
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,44 @@ | ||
// Copyright (C) 2018-2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
#include "intel_npu/al/icompiler.hpp" | ||
|
||
namespace intel_npu { | ||
namespace driverCompilerAdapter { | ||
|
||
struct IR { | ||
std::stringstream xml; | ||
std::stringstream weights; | ||
}; | ||
|
||
/** | ||
* @brief Interface for external compiler | ||
* @details Isolate external API calls from general logic | ||
*/ | ||
class IExternalCompiler { | ||
public: | ||
virtual ~IExternalCompiler() = default; | ||
|
||
/** | ||
* @brief Get opset supported by compiler | ||
*/ | ||
virtual uint32_t getSupportedOpset() const = 0; | ||
|
||
/** | ||
* @brief Get query result for current network | ||
*/ | ||
virtual std::unordered_set<std::string> getQueryResult(IR& irModel, const Config& config) const = 0; | ||
|
||
/** | ||
* @brief Sends the serialized model and its I/O metadata to the driver for compilation. | ||
* @return The compiled model descriptor corresponding to the previously given network. | ||
*/ | ||
virtual NetworkDescription compileIR(const std::shared_ptr<const ov::Model>& model, | ||
IR& irModel, | ||
const Config& config) const = 0; | ||
virtual NetworkMetadata parseBlob(const std::shared_ptr<ov::MappedMemory>& mmapBlob, const Config& config) const = 0; | ||
}; | ||
} // namespace driverCompilerAdapter | ||
} // namespace intel_npu |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters