onnx-mlir
onnx-mlir copied to clipboard
Uplift BatchNormalization, CastLike, Bernoulli to opset 15
This PR helps move some ops to the latest opset. These are all ops whose latest redefinition are in opset 15, and haven't been updated or added in onnx-mlir
Ops introduced in Opset 15
- CastLike
- Bernoulli
Ops changes
- BatchNormalization
Note that BatchNormalization has a more relaxed definition in Opset15. It allows more flexibility in the types of its inputs.
Can one of the admins verify this patch?
Can one of the admins verify this patch?
Can one of the admins verify this patch?
Updated the branch, which will also automatically trigger the CIs since I did it. So you will have to do a pull, let me know if you prefer me not doing this and simply laughing the CIs for you.
I have not looked at the code in detail yet, our goal is to maintain backward compatibility with older models. So as you upgrade, make sure that the old version also works. Sometimes it is easy, as the old one works by default, sometime there is some minimal work (e.g. when an attribute becomes a input), and sometime we had to rename the old version of the op with an explicit version number (make this one up, ONNXSqueezeV13Op
), migrate all our current code to that versioned op, and make the new op the default (without version number) with the new support it requires. I believe it is well documented in our docs folder.
@jenkins-droid test this please
@philass since you don't have rights to push down code (I think), let me know when you are ready to do so.
No change needed for lowering. The only change of BatchNormalization is that ReduceMean has to be float when the input is float16. That is used only in the train mode. We only lowered BathNormalization for inference mode.
@AlexandreEichenberger I'm ready to have this merged.
Thanks for the review. And thanks @chentong319 for the input
@chentong319 ready to approve? If yes, and @philass is happy with the state of the PR, I can merge it. Tx to all
@chentong319 are you ready to approve this PR, or suggest changes? Tx @philass there are some conflicts that need manual attention.
Thanks @AlexandreEichenberger,
I Fixed the conflicts
updating and hopefully the AMD ci will come clean
Thanks @AlexandreEichenberger
@jenkins-droid test this please
@chentong319 / @tungld,
Could one of you guys merge it for me?
Jenkins Linux ppc64le Build #6468 [push] Uplift BatchNormalizatio... started at 21:38
Jenkins Linux amd64 Build #7403 [push] Uplift BatchNormalizatio... started at 20:37
Jenkins Linux s390x Build #7419 [push] Uplift BatchNormalizatio... started at 21:37
Jenkins Linux amd64 Build #7403 [push] Uplift BatchNormalizatio... failed after 40 min
Jenkins Linux ppc64le Build #6468 [push] Uplift BatchNormalizatio... aborted after 1 hr 18 min
Jenkins Linux s390x Build #7419 [push] Uplift BatchNormalizatio... aborted after 1 hr 18 min