Skip to content
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

Custom Op runtime wrapper example #150

Draft
wants to merge 7 commits into
base: main
Choose a base branch
from

Conversation

adrianlizarraga
Copy link
Contributor

@adrianlizarraga adrianlizarraga commented Oct 4, 2022

This is a draft to illustrate the use of the tentatively named OpWrapperExecutionProvider: microsoft/onnxruntime#13216

This runs an OpenVINO classification example using a custom OP that wraps a googlenet-v1 model.

TODO

  • Build instructions
  • Scripts to download model and input image.

#include "custom_op.h"
#include "openvino_wrapper.h"

static const char* c_OpDomain = "ai.onnx.contrib";
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: remake onnx model to use a different domain name


[[nodiscard]] bool HasArgs() const { return index_ < argc_; }

[[nodiscard]] std::string_view NextArg() {
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Change to Next()


// Setup input
std::array<int64_t, 4> input_shape{1, 3, 224, 224};
std::vector<float> input_vals(GetShapeSize(input_shape), 1.0f);
Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

TODO: Input image data.

@adrianlizarraga adrianlizarraga changed the title OpWrapper EP example Custom Op runtime wrapper example Oct 25, 2022
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

1 participant