-
Notifications
You must be signed in to change notification settings - Fork 2.2k
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[intel-npu] Adding new, unified properties handling class and objects…
… to plugin and compiled_model [ WIP commit ]
- Loading branch information
Showing
6 changed files
with
392 additions
and
305 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,33 @@ | ||
// Copyright (C) 2018-2024 Intel Corporation | ||
// SPDX-License-Identifier: Apache-2.0 | ||
// | ||
|
||
#pragma once | ||
|
||
#include "intel_npu/al/config/config.hpp" | ||
#include "metrics.hpp" | ||
|
||
namespace intel_npu { | ||
|
||
enum class PropertiesType { PLUGIN, COMPILED_MODEL }; | ||
|
||
class Properties final { | ||
public: | ||
Properties(const PropertiesType pType, Config& config, const std::shared_ptr<Metrics>& metrics = nullptr); | ||
|
||
void registerProperties(); | ||
|
||
ov::Any get_property(const std::string& name, const ov::AnyMap& arguments) const; | ||
void set_property(const ov::AnyMap& properties); | ||
|
||
private: | ||
PropertiesType _pType; | ||
Config& _config; | ||
std::shared_ptr<Metrics> _metrics; | ||
|
||
// properties map: {name -> [supported, mutable, eval function]} | ||
std::map<std::string, std::tuple<bool, ov::PropertyMutability, std::function<ov::Any(const Config&)>>> _properties; | ||
std::vector<ov::PropertyName> _supportedProperties; | ||
}; | ||
|
||
} // 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
Oops, something went wrong.