Skip to content

Commit

Permalink
[ONNX] Extended NodeContext interface (#28867)
Browse files Browse the repository at this point in the history
### Details:
- Added a get_name() method's implementation for onnx::NodeContext to be
more compatible with other FrontEnds

### Tickets:
 - N/A
  • Loading branch information
gkrivor authored Feb 7, 2025
1 parent 3c7f2af commit 5c950ff
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
Original file line number Diff line number Diff line change
Expand Up @@ -21,6 +21,8 @@ class ONNX_FRONTEND_API NodeContext : public ov::frontend::NodeContext {

Output<ov::Node> get_input(int port_idx) const override;

const std::string& get_name() const override;

ov::Any get_attribute_as_any(const std::string& name) const override;

protected:
Expand Down
4 changes: 4 additions & 0 deletions src/frontends/onnx/frontend/src/node_context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -15,6 +15,10 @@ ov::Output<ov::Node> ov::frontend::onnx::NodeContext::get_input(int port_idx) co
return m_inputs.at(port_idx);
}

const std::string& ov::frontend::onnx::NodeContext::get_name() const {
return m_context.get_name();
}

ov::Any ov::frontend::onnx::NodeContext::get_attribute_as_any(const std::string& name) const {
try {
return m_context.get_attribute_value<ov::Any>(name);
Expand Down

0 comments on commit 5c950ff

Please sign in to comment.