-
Notifications
You must be signed in to change notification settings - Fork 53
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 2 patterns to fuse nodes into SoftmaxCrossEntropyLoss #1782
Conversation
Signed-off-by: Xavier Dupre <[email protected]>
Codecov ReportAttention: Patch coverage is
Additional details and impacted files@@ Coverage Diff @@
## main #1782 +/- ##
==========================================
+ Coverage 75.07% 75.11% +0.04%
==========================================
Files 245 247 +2
Lines 26555 26663 +108
Branches 4873 4898 +25
==========================================
+ Hits 19936 20028 +92
- Misses 5685 5692 +7
- Partials 934 943 +9 ☔ View full report in Codecov by Sentry. |
# import onnxruntime does not because of the subfolder named onnxruntime | ||
import os | ||
import sys | ||
|
||
sys_path = sys.path | ||
sys.path = [os.path.join(onnx.__file__, "..", "..")] + [ | ||
p for p in sys_path if "onnxruntime" in p | ||
] | ||
import onnxruntime |
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.
hmm
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.
The right fix is to rename onnxruntime subfolder.
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.
See #1786.
Co-authored-by: Justin Chu <[email protected]>
Co-authored-by: Justin Chu <[email protected]>
Co-authored-by: Justin Chu <[email protected]>
Co-authored-by: Justin Chu <[email protected]>
Co-authored-by: Justin Chu <[email protected]>
Signed-off-by: Xavier Dupre <[email protected]>
Signed-off-by: Xavier Dupre <[email protected]>
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.
lintrunner found more than 20 potential problems in the proposed changes. Check the Files changed tab for more details.
The pattern should now become {LogSoftmax -> NegativeLogLikelihoodLoss} |
Signed-off-by: Xavier Dupre <[email protected]>
@@ -0,0 +1,108 @@ | |||
# Copyright (c) Microsoft Corporation. |
Check warning
Code scanning / lintrunner
RUFF/format Warning
@@ -0,0 +1,108 @@ | |||
# Copyright (c) Microsoft Corporation. | |||
# Licensed under the MIT License. | |||
from __future__ import annotations |
Check warning
Code scanning / lintrunner
RUFF/I001 Warning
See https://docs.astral.sh/ruff/rules/unsorted-imports
I believe this is outdated and can be closed? |
Fixes infinite outputs when this operator is decomposed.