Skip to content
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

[torchlib] Fix _log_softmax #1789

Merged
merged 7 commits into from
Aug 8, 2024
Merged

[torchlib] Fix _log_softmax #1789

merged 7 commits into from
Aug 8, 2024

Conversation

justinchuby
Copy link
Collaborator

@justinchuby justinchuby commented Aug 7, 2024

Fix _log_softmax by moving the IsScalar call to the top so it can be eagerly evaluated.

Also specify the squeeze axis explicitly to improve compatibility with ORT: microsoft/onnxruntime#21661

This should fix a runtime error in XGLMForCausalLM

Specify the squeeze axis explicitly to improve compatibility with ORT: microsoft/onnxruntime#21661
@justinchuby justinchuby added the topic: torch_lib Related to the torch/aten function lib in development label Aug 7, 2024
@justinchuby justinchuby changed the title [torchlib] Specify the squeeze axis [torchlib] Specify the squeeze axes when input is scalar Aug 7, 2024
Copy link

codecov bot commented Aug 7, 2024

Codecov Report

Attention: Patch coverage is 37.50000% with 5 lines in your changes missing coverage. Please review.

Project coverage is 75.02%. Comparing base (cf5ddd9) to head (daeb3b3).
Report is 1 commits behind head on main.

Files Patch % Lines
onnxscript/function_libs/torch_lib/ops/core.py 37.50% 2 Missing and 3 partials ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1789      +/-   ##
==========================================
- Coverage   75.04%   75.02%   -0.03%     
==========================================
  Files         245      245              
  Lines       26512    26518       +6     
  Branches     4834     4836       +2     
==========================================
- Hits        19897    19895       -2     
- Misses       5683     5688       +5     
- Partials      932      935       +3     

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

Copy link

github-actions bot commented Aug 7, 2024

Test Results

     24 files  ±     0       24 suites  ±0   3h 26m 17s ⏱️ + 1m 47s
 13 506 tests  -  2 183   11 936 ✅  - 1 746    1 543 💤  -    434   27 ❌  - 3 
481 900 runs  +18 070  100 122 ✅ +2 632  381 550 💤 +15 441  228 ❌  - 3 

For more details on these failures, see this check.

Results for commit daeb3b3. ± Comparison against base commit cf5ddd9.

This pull request removes 2183 tests.
onnxscript._internal.analysis_test.TestAssignedVarAnalysis ‑ test_basic_defs
onnxscript._internal.analysis_test.TestAssignedVarAnalysis ‑ test_doc_string
onnxscript._internal.analysis_test.TestAssignedVarAnalysis ‑ test_if_defs
onnxscript._internal.analysis_test.TestAssignedVarAnalysis ‑ test_if_loop_defs
onnxscript._internal.analysis_test.TestAssignedVarAnalysis ‑ test_loop_defs
onnxscript._internal.analysis_test.TestExposedUses ‑ test_basic
onnxscript._internal.analysis_test.TestExposedUses ‑ test_called_function
onnxscript._internal.analysis_test.TestExposedUses ‑ test_doc_string
onnxscript._internal.analysis_test.TestExposedUses ‑ test_for_loop
onnxscript._internal.analysis_test.TestExposedUses ‑ test_if
…

♻️ This comment has been updated with latest results.

@justinchuby justinchuby changed the title [torchlib] Specify the squeeze axes when input is scalar [torchlib] Fix _log_softmax Aug 7, 2024
@justinchuby justinchuby merged commit 9bae2b5 into main Aug 8, 2024
33 of 43 checks passed
@justinchuby justinchuby deleted the justinchu/squeeze branch August 8, 2024 00:08
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
topic: torch_lib Related to the torch/aten function lib in development
Projects
Development

Successfully merging this pull request may close these issues.

2 participants