-
Notifications
You must be signed in to change notification settings - Fork 319
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 decomposition for ONNXSoftmaxCrossEntropyLossOp
#2968
Add decomposition for ONNXSoftmaxCrossEntropyLossOp
#2968
Conversation
Signed-off-by: Sam <[email protected]>
Can one of the admins verify this patch? |
i'm not really familiar with them so will have to look into it, but should i add to |
also i'm not considering the Edit: actually just realized it is an optional, not defaulted, attribute. so i know how to check. but if anyone has ideas on how to extend this to support it, i'm all ears. the simplest thing i can think of is to just subtract the slice at |
Signed-off-by: Sam <[email protected]>
Can one of the admins verify this patch? |
@jenkins-droid test this please |
Signed-off-by: Sam <[email protected]>
Can one of the admins verify this patch? |
i think i misunderstood the mean reduction with weights case. looking into it now (my recent "fix" commit is wrong) |
so i was just summing over the original |
@jenkins-droid test this please |
Signed-off-by: Sam <[email protected]>
Can one of the admins verify this patch? |
@AlexandreEichenberger you might want to cancel and rerun since i just pushed. also is there a rule of thumb for running tests? since this is still in draft i might push commits that shouldn't be tested yet. maybe i should just not have this drafted yet? sorry if i'm not following some etiquette for this |
Can one of the admins verify this patch? |
@jenkins-droid test this please |
1 similar comment
@jenkins-droid test this please |
@AlexandreEichenberger should i undraft to get some feedback on the testing i asked about? I figured i should get feedback first but i don't know of a good person to ping for this. |
Can one of the admins verify this patch? |
@jenkins-droid test this please |
We just run the CIs each time. I believe once a PR has been created, then it will run the CIs. If you just push to GitHub without creating a PR, then I think no CIs are run. I would not worry about it, just do your work, and the CIs will help you along the way to see the progress of your code. I also asked to add you on the list of approved folks that can run our CIs as you seem quite active and doing solid work. Thanks for your contributions, much appreciated. |
thanks for the response and kind words. that would be great |
@srcarroll do you have someone in your org that could review the HLO specifics of your PRs? |
Unfortunately not. I work at a very small startup and I'm pretty much the only contributor to mlir projects at the moment. @brnorris03 does contribute updates regulary and has worked on some onnx conversion, so she knows enough MLIR to review that aspect. When you say the HLO specifics, do you mean how it effects conversion to stablehlo? I have some knowledge of the stablehlo dialect and have contributed some changes to that project, but I wouldn't call myself an expert in that area. Otherwise I'm honestly unsure how my PRs are related to HLO. |
@srcarroll will merge once we get a free run; please let me know if you want to wait before merging. |
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.
LGTM
@AlexandreEichenberger thanks! i'm fine with merging when you are. i just wasn't sure if i should add some semantics tests somewhere. for what it's worth, i have my own test suite (not upstreamable) and have confirmed i get correct results from this decomposition |
Actually looks like I forgot to add a check for the ignore_index attribute. I don't handle that case, so should match fail. Let me update that real quick |
@AlexandreEichenberger maybe you can help me understand something. I just noticed that i get the |
@srcarroll that is something that I also do often; offline verification, and then I just add a lit test that make sure that the overall step remains the same as when I did the offline verification. If you need help creating a lit test, here is what I do. I create a small mlir file with my test, put the proper RUN command then copy dummy test code, making sure that the function name matches, e.g.
Or you can add the new test case to an existing test file, even easier, and just make sure you have a CHECK that will fails. (Note also that multiple consecutive tests must be separated by a then I run It will test the file, and fix all of the individual tests that fails and pipe them to the std out. Then I diff the original file and the piped output... make sure that the new stuff looks good. When I am satisfied, then I just replace the old file by the new file. Hope this helps. |
thanks. i actually have already added tests to |
actually, looks like it doesn't appear from the conversion. it actually shows up in the onnx graph exported from torch. for example
was generated from
This seems wrong to me. Am i missing something? Update: Ah I just realized this isn't an onnx thing, it's a torch thing. Doesn't make sense that they would default to |
Thanks for your contributions. |
Jenkins Linux ppc64le Build #15002 [push] Add decomposition for `O... started at 13:54 |
Jenkins Linux amd64 Build #15972 [push] Add decomposition for `O... started at 12:39 |
Jenkins Linux s390x Build #15975 [push] Add decomposition for `O... started at 13:39 |
Jenkins Linux amd64 Build #15972 [push] Add decomposition for `O... passed after 1 hr 20 min |
Jenkins Linux s390x Build #15975 [push] Add decomposition for `O... passed after 1 hr 25 min |
Jenkins Linux ppc64le Build #15002 [push] Add decomposition for `O... passed after 2 hr 21 min |
No description provided.