-
Notifications
You must be signed in to change notification settings - Fork 2.4k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
MultiSubgraph in nGraph #6621
MultiSubgraph in nGraph #6621
Conversation
update my fork
Update forked branch
Update forked branch
Update forked branch
Update forked branch
Update forked branch
Update forked branch
Update forked branch
Update forked branch
Update forked branch
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
in general LGTM
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
I don't see any new tests, can we add new tests to cover subgraph base?
/// SubGraphOp. | ||
/// | ||
class NGRAPH_API SliceInputDescription : public InputDescription | ||
virtual std::shared_ptr<Function> get_function() { return m_bodies[0]; }; |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtual std::shared_ptr<Function> get_function() { return m_bodies[0]; }; | |
virtual const std::shared_ptr<Function>& get_function() { return m_bodies[0]; }; |
/// | ||
class NGRAPH_API SliceInputDescription : public InputDescription | ||
virtual std::shared_ptr<Function> get_function() { return m_bodies[0]; }; | ||
virtual std::shared_ptr<const Function> get_function() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
virtual std::shared_ptr<const Function> get_function() const | |
virtual const std::shared_ptr<const Function>& get_function() const |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Do we really need to have both methods?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
its old code, i dont fix it, in ti and loop sometimes are used theese methods,
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
It happened historically :) I don't remember exactly the whole story. We had get_function() without const qualifier in TensorIterator and SubGraph classes (it was an error), but Gleb G. wanted to use this function in const context, so he added a new function with const qualifier.
I guess we can remain only
virtual const std::shared_ptr<const Function>& get_function() const
But I'm not sure it's backward compatible change or not, @ilyachur what do you think should leave both functions or it's better to remain only one?
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
If we don't modify the function I think we can have only one function. In any way, we can decide it in the separate PR.
Please fix CI |
* Add multisubgraph * Fix format * Fix clang format * Fix TensorIterator RTT * Fix subgraph * Fix codestyle * Fix comments * Fix comments * Fix coments * Fix comments * delete get function * fix methods * fix ci * Fix ci * fix bugs * Fix cmake * Fix ci * delete virtual function * delete virtual function * fix ci * Fix ci
* Add multisubgraph * Fix format * Fix clang format * Fix TensorIterator RTT * Fix subgraph * Fix codestyle * Fix comments * Fix comments * Fix coments * Fix comments * delete get function * fix methods * fix ci * Fix ci * fix bugs * Fix cmake * Fix ci * delete virtual function * delete virtual function * fix ci * Fix ci
* Add multisubgraph * Fix format * Fix clang format * Fix TensorIterator RTT * Fix subgraph * Fix codestyle * Fix comments * Fix comments * Fix coments * Fix comments * delete get function * fix methods * fix ci * Fix ci * fix bugs * Fix cmake * Fix ci * delete virtual function * delete virtual function * fix ci * Fix ci
Ticket #50047
Added new base class for operations with subgraphs