Skip to content

Commit

Permalink
[NPU] Fix compiler clang build (openvinotoolkit#27405)
Browse files Browse the repository at this point in the history
### Details:
 - *Change from define to constexpr and remove unused code*
 - *Fix clang build*

### Tickets:
 - *EISW-146067*

---------

Signed-off-by: Bogdan Pereanu <[email protected]>
  • Loading branch information
pereanub authored and NishantPrabhuFujitsu committed Nov 26, 2024
1 parent fcd9fe7 commit e05f123
Show file tree
Hide file tree
Showing 3 changed files with 5 additions and 10 deletions.
10 changes: 3 additions & 7 deletions src/plugins/intel_npu/src/al/include/intel_npu/prefix.hpp
Original file line number Diff line number Diff line change
Expand Up @@ -11,9 +11,9 @@ namespace intel_npu {
//
// Prefix for ReadValue and Assign operations in compiler.
//
#define READVALUE_PREFIX std::string("vpux_ie_read_value_")
#define ASSIGN_PREFIX std::string("vpux_ie_assign_")
#define SHAPE_TENSOR_PREFIX std::string("vpux_ie_shape_")
constexpr std::string_view READVALUE_PREFIX = "vpux_ie_read_value_";
constexpr std::string_view ASSIGN_PREFIX = "vpux_ie_assign_";
constexpr std::string_view SHAPE_TENSOR_PREFIX = "vpux_ie_shape_";

inline bool isStateInputName(const std::string& name) {
return !name.compare(0, READVALUE_PREFIX.length(), READVALUE_PREFIX);
Expand All @@ -25,8 +25,4 @@ inline bool isShapeTensorName(const std::string& name) {
return !name.compare(0, SHAPE_TENSOR_PREFIX.length(), SHAPE_TENSOR_PREFIX);
}

inline std::string stateOutputToStateInputName(const std::string& name) {
return READVALUE_PREFIX + name.substr(ASSIGN_PREFIX.length());
}

} // namespace intel_npu
Original file line number Diff line number Diff line change
Expand Up @@ -396,7 +396,6 @@ ze_graph_handle_t ZeGraphExtWrappers<TableExtension>::getGraphHandle(
const uint32_t& flags) const {
ze_graph_handle_t graphHandle;

_logger.info("compileIR Using extension version: %s", typeid(TableExtension).name());
createGraph(std::move(serializedIR), buildFlags, flags, &graphHandle);

return graphHandle;
Expand Down
Original file line number Diff line number Diff line change
Expand Up @@ -70,7 +70,7 @@ struct ze_graph_dditable_ext_decorator final {
}
~ze_graph_dditable_ext_decorator() = default;

inline const uint32_t version() const {
inline uint32_t version() const {
return _driverExtVersion;
}

Expand Down Expand Up @@ -202,7 +202,7 @@ struct ze_command_queue_npu_dditable_ext_decorator final {
_commandQueueExtVersion(commandQueueExtVersion) {}
~ze_command_queue_npu_dditable_ext_decorator() = default;

inline const uint32_t version() const {
inline uint32_t version() const {
return _commandQueueExtVersion;
}

Expand Down

0 comments on commit e05f123

Please sign in to comment.