-
Notifications
You must be signed in to change notification settings - Fork 63
Kanvi/create a dummy backend for testing #420
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
Conversation
sayantan-nervana
left a comment
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.
LGTM
test/dummy_backend.cpp
Outdated
| #include "ngraph/descriptor/layout/dense_tensor_layout.hpp" | ||
| #include "ngraph/except.hpp" | ||
| #include "ngraph/op/convert.hpp" | ||
| #include "ngraph/op/select.hpp" |
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 need to include all these files? Dont see any obvious dependency.
ngraph/op/convert.hpp"
ngraph/op/select.hpp"
test/test_dummy_backend.cpp
Outdated
| namespace testing { | ||
|
|
||
| // Test is_supported API | ||
| TEST(DummyBackend, Test_is_supported) { |
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.
Test name should not have underscore
Both names must be valid C++ identifiers, and they should not contain any underscores
https://github.com/google/googletest/blob/master/googletest/docs/primer.md
| // See the License for the specific language governing permissions and | ||
| // limitations under the License. | ||
| //***************************************************************************** | ||
|
|
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.
missing header guard
| class ng::runtime::dummy::DummyExecutable : public ng::runtime::Executable { | ||
| public: | ||
| DummyExecutable(std::shared_ptr<ng::Function> function, | ||
| bool enable_performance_collection = false); |
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.
curious: will we be able to create a backend like we create the other backends? maybe not.
https://github.com/tensorflow/ngraph-bridge/blob/master/ngraph_bridge/ngraph_backend_manager.cc#L62
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.
probably not. these need .so. Kanvi's example just creates a backend class/object on the fly
shresthamalik
left a comment
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.
LGTM
No description provided.