-
Notifications
You must be signed in to change notification settings - Fork 100
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
Add support for registring custom op libraries #68
Draft
marshallpierce
wants to merge
6
commits into
nbigaouette:master
Choose a base branch
from
marshallpierce:mp/custom-op
base: master
Could not load branches
Branch not found: {{ refName }}
Loading
Could not load tags
Nothing to show
Loading
Are you sure you want to change the base?
Some commits from the old base branch may be removed from the timeline,
and old review comments may become outdated.
Commits on Feb 24, 2021
-
Introduce a new trait to represent types that can be used as output f…
…rom a tensor This is some prep work for string output types and tensor types that vary across the model outputs. For now, the supported types are just the basic numeric types. Since strings have to be copied out of a tensor, it only makes sense to have `String` be an output type, not `str`, hence the new type so that we can have more input types supported than output types.
Configuration menu - View commit details
-
Copy full SHA for 0d34d23 - Browse repository at this point
Copy the full SHA 0d34d23View commit details
Commits on Feb 26, 2021
-
Use
DynOrtTensor
for model output tensorsOutputs aren't all the same type for a single model, so this allows extracting different types per tensor.
Configuration menu - View commit details
-
Copy full SHA for 555bec7 - Browse repository at this point
Copy the full SHA 555bec7View commit details
Commits on Mar 9, 2021
-
Support the onnx string type in output tensors
This approach allocates owned Strings for each element, which works, but stresses the allocator, and incurs unnecessary copying. Part of the complication stems from the limitation that in Rust, a field can't be a reference to another field in the same struct. This means that having a Vec<u8> of copied data, referred to by a Vec<&str>, which is then referred to by an ArrayView, requires a sequence of 3 structs to express. Building a Vec<String> gets rid of the references, but also loses the efficiency of 1 allocation with strs pointing into it.
Configuration menu - View commit details
-
Copy full SHA for d2f1ebe - Browse repository at this point
Copy the full SHA d2f1ebeView commit details -
Support the onnx string type in output tensors
This approach allocates owned Strings for each element, which works, but stresses the allocator, and incurs unnecessary copying. Part of the complication stems from the limitation that in Rust, a field can't be a reference to another field in the same struct. This means that having a Vec<u8> of copied data, referred to by a Vec<&str>, which is then referred to by an ArrayView, requires a sequence of 3 structs to express. Building a Vec<String> gets rid of the references, but also loses the efficiency of 1 allocation with strs pointing into it.
Configuration menu - View commit details
-
Copy full SHA for 495ecb4 - Browse repository at this point
Copy the full SHA 495ecb4View commit details -
Configuration menu - View commit details
-
Copy full SHA for 6cf6d0e - Browse repository at this point
Copy the full SHA 6cf6d0eView commit details
Commits on Mar 10, 2021
-
Configuration menu - View commit details
-
Copy full SHA for 457012b - Browse repository at this point
Copy the full SHA 457012bView commit details
Add this suggestion to a batch that can be applied as a single commit.
This suggestion is invalid because no changes were made to the code.
Suggestions cannot be applied while the pull request is closed.
Suggestions cannot be applied while viewing a subset of changes.
Only one suggestion per line can be applied in a batch.
Add this suggestion to a batch that can be applied as a single commit.
Applying suggestions on deleted lines is not supported.
You must change the existing code in this line in order to create a valid suggestion.
Outdated suggestions cannot be applied.
This suggestion has been applied or marked resolved.
Suggestions cannot be applied from pending reviews.
Suggestions cannot be applied on multi-line comments.
Suggestions cannot be applied while the pull request is queued to merge.
Suggestion cannot be applied right now. Please check back later.