-
Notifications
You must be signed in to change notification settings - Fork 420
add onnxruntime custom op's backend #121
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 onnxruntime custom op's backend #121
Conversation
daquexian
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.
Thanks for your great contribution! Overall it looks good to me. Some minor comments are posted.
onnxsim/__main__.py
Outdated
| input_shapes[name] = shape | ||
| input_shapes.update({name: shape}) | ||
|
|
||
| input_datas = dict() |
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.
input_data_paths is a better name
| input_shapes = {} | ||
| sess_options = rt.SessionOptions() | ||
| if custom_lib is not None: | ||
| if os.path.exists(custom_lib): |
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.
raise an exception if file named custom_lib does not exist
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.
that's great, i will add it
onnxsim/__main__.py
Outdated
| if args.input_data is not None: | ||
| for x in args.input_data: | ||
| pieces = x.split(':') | ||
| name, data = pieces[0], pieces[-1] |
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.
pieces[0] -> ':'.join(pieces[:-1])
|
Thanks for your great contribution! |
I moved the previous pr to this