Add validation of op registrations#5817
Conversation
- the script has all the logic to process the registrations, and there's a CI that uses it Fix some operator registrations
| key, value = entry | ||
| opset_from, opset_to = value | ||
|
|
||
| deprecated = key in deprecated_ops and opset_to == deprecated_ops[key] - 1 |
There was a problem hiding this comment.
deprecated_ops[key] - 1 [](start = 59, length = 23)
If we do this calculation every time and there is no other dependency on deprecated_ops[key], why not we just save the targeted value there for convenience?
There was a problem hiding this comment.
We do this once after processing all registrations. Not sure what you mean by 'save the targeted value there'.
In reply to: 523938771 [](ancestors = 523938771)
… exclude ops script and an op registration validation script. Run op validation in minimal build CI
|
|
||
| ort_root = os.path.abspath(args.ort_root) if args.ort_root else '' | ||
| include_cuda = True # validate CPU and CUDA EP registrations | ||
|
|
There was a problem hiding this comment.
I guess this does not really matter, but it will be nice this can be a param also and default to true
There was a problem hiding this comment.
Might as well validate all the registrations. Seems an unnecessary complication to have a param to do a subset of files (vs the use case where you're disabling registrations and modifying files where it makes more sense to do that sort of thing).
Description:
Add validation of operator registrations to the reduction script
Fix some operator registrations
Motivation and Context
Prevent invalid op registrations in the future.