Thanks to visit codestin.com
Credit goes to github.com

Skip to content

Conversation

@BowenBao
Copy link
Collaborator

This is a cherry-picks of stack of 2 PRs: #52349 and #52350 into release/1.8 branch

Fixed how type casting is handled in mixed precision onnx export.

…ytorch#51729)

Adds a check for patterns for cases with autocasting enabled in which a cast node is inserted before the NegativeLogLikelihoodLoss
node and causing these patterns below not to be recognizable by peephole pass function
When onnx export creates a 0-dim tensor of constant type, this action overrides the type promotion logic as quoted in pytorch#9515. In order to prevent this from happening this PR adds the following functionality.
If the data type is a floating point type, it is converted to a 0-dim double tensor, else it is converted to a 0-dim tensor of its original type
@facebook-github-bot facebook-github-bot added cla signed oncall: jit Add this issue/PR to JIT oncall triage queue labels Feb 19, 2021
@facebook-github-bot
Copy link
Contributor

facebook-github-bot commented Feb 19, 2021

💊 CI failures summary and remediations

As of commit 342ed7d (more details on the Dr. CI page):


  • 1/1 failures possibly* introduced in this PR
    • 1/1 non-scanned failure(s)

ci.pytorch.org: 1 failed


This comment was automatically generated by Dr. CI (expand for details).Follow this link to opt-out of these comments for your Pull Requests.

Please report bugs/suggestions to the (internal) Dr. CI Users group.

@codecov
Copy link

codecov bot commented Feb 19, 2021

Codecov Report

Merging #52510 (342ed7d) into release/1.8 (0851cc4) will increase coverage by 0.33%.
The diff coverage is 5.88%.

@@               Coverage Diff               @@
##           release/1.8   #52510      +/-   ##
===============================================
+ Coverage        80.48%   80.82%   +0.33%     
===============================================
  Files             1948     1948              
  Lines           213248   213263      +15     
===============================================
+ Hits            171641   172375     +734     
+ Misses           41607    40888     -719     

@seemethere seemethere added this to the 1.8.0 milestone Feb 19, 2021
@seemethere seemethere merged commit 8e7eebf into pytorch:release/1.8 Feb 19, 2021
@spandantiwari
Copy link

Thanks for the help to cherry pick this for the 1.8 branch @seemethere @SplitInfinity @gchanan @jspisak .

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

cla signed oncall: jit Add this issue/PR to JIT oncall triage queue open source

Projects

None yet

Development

Successfully merging this pull request may close these issues.

6 participants