Skip to content

Fix upsample half pixel mode for size one#2918

Open
PrithviBadiga wants to merge 1 commit into
microsoft:mainfrom
PrithviBadiga:fix-aten-upsampling-half-pixel-size-one
Open

Fix upsample half pixel mode for size one#2918
PrithviBadiga wants to merge 1 commit into
microsoft:mainfrom
PrithviBadiga:fix-aten-upsampling-half-pixel-size-one

Conversation

@PrithviBadiga
Copy link
Copy Markdown

Fixes the ATen upsampling lowering for align_corners=False to use ONNX half_pixel mode instead of pytorch_half_pixel.

pytorch_half_pixel special-cases output size 1 differently from PyTorch eager behavior, causing mismatches for cases like upsample_bilinear2d(..., output_size=(1, 1), align_corners=False). This change makes the exported Resize node match PyTorch results for that edge case.

Adds regression samples for 2D upsampling with output size 1, covering both upsample_bilinear2d and upsample_bilinear2d.vec.

@PrithviBadiga
Copy link
Copy Markdown
Author

@microsoft-github-policy-service agree

@PrithviBadiga
Copy link
Copy Markdown
Author

@PrithviBadiga please read the following Contributor License Agreement(CLA). If you agree with the CLA, please reply with the following information.

@microsoft-github-policy-service agree [company="{your company}"]

Options:

  • (default - no company specified) I have sole ownership of intellectual property rights to my Submissions and I am not making Submissions in the course of work for my employer.
@microsoft-github-policy-service agree
  • (when company given) I am making Submissions in the course of work for my employer (or my employer has intellectual property rights in my Submissions by contract or applicable law). I have permission from my employer to make Submissions and enter into this Agreement on behalf of my employer. By signing below, the defined term “You” includes me and my employer.
@microsoft-github-policy-service agree company="Microsoft"

Contributor License Agreement

@microsoft-github-policy-service agree

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

Labels

None yet

Projects

Development

Successfully merging this pull request may close these issues.

1 participant