-
Notifications
You must be signed in to change notification settings - Fork 631
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
ONNXRuntime adding custom op #232
Comments
I am working on a custom activation function and have implemented it to Onnx as a function i.e an operator schema with a combination of primitive Onnx operators. "Fail: [ONNXRuntimeError] : 1 : FAIL : Load model from testng.onnx failed:/onnxruntime_src/onnxruntime/core/graph/model_load_utils.h:47 void onnxruntime::model_load_utils::ValidateOpsetForDomain(const std::unordered_map<std::basic_string, int>&, const onnxruntime::logging::Logger&, bool, const string&, int) ONNX Runtime only guarantees support for models stamped with official released onnx opset versions. Opset 14 is under development and support for this is limited. The operator schemas and or other functionality may change before next ONNX release and in this case ONNX Runtime will not guarantee backward compatibility. Current official support for domain ai.onnx is till opset 13." Please help me know how to change the opset version for a model having only an individual operator created using helper.make_node and helper.make_graph. |
https://www.onnxruntime.ai/docs/how-to/add-custom-op.html has some docs surrounding how to add custom ops in ONNXRuntime and refers to sample/test code in the links there |
@mldlwizard were you able to find any solution to your issue? I am kind of facing the similar problem and would like to hear if there are any work arounds. |
Question
I have created C++ script, build the binary .so file and imported with load library and added my new function to ONNX.
I have loaded and checked the model, everything looks fine.
Now, I would like to run the model with ONNXRuntime, however I am getting:
The provided tutorial does not tell clearly directory and file names that need to be created.
Could you please elaborate clearly the steps, to register my custom op in ONNXRuntime with the real example, file names?
The text was updated successfully, but these errors were encountered: