Skip to content

[xpu][fix] Fix conv1d precision error#162944

Closed
yucai-intel wants to merge 17 commits intopytorch:mainfrom
yucai-intel:yucai-conv1d-fix
Closed

[xpu][fix] Fix conv1d precision error#162944
yucai-intel wants to merge 17 commits intopytorch:mainfrom
yucai-intel:yucai-conv1d-fix

Conversation

@yucai-intel
Copy link
Contributor

@yucai-intel yucai-intel commented Sep 15, 2025

Currently, conv1d converts the 3D view to 4D before calling onednn::convolution().
However, this function converts the 4D tensor to a channel-last memory format for computation, resulting in incorrect return results (the correct result should be channel-first).
This PR fixes this issue, ensuring that the output return value format is consistent with the expected format.
cc @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @jerryzh168 @aditew01

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 15, 2025

🔗 Helpful Links

🧪 See artifacts and rendered test results at hud.pytorch.org/pr/162944

Note: Links to docs will display an error until the docs builds have been completed.

✅ You can merge normally! (2 Unrelated Failures)

As of commit 4bb85cd with merge base 3e4faca (image):

FLAKY - The following job failed but was likely due to flakiness present on trunk:

UNSTABLE - The following job is marked as unstable, possibly due to flakiness on trunk:

This comment was automatically generated by Dr. CI and updates every 15 minutes.

@pytorch-bot pytorch-bot bot added the module: cpu CPU specific problem (e.g., perf, algorithm) label Sep 15, 2025
@yucai-intel yucai-intel marked this pull request as draft September 15, 2025 08:51
@guangyey guangyey added the release notes: xpu release notes category label Sep 16, 2025
Copy link
Collaborator

@guangyey guangyey left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Please add a ut.

@yucai-intel yucai-intel marked this pull request as ready for review October 17, 2025 06:08
@chuanqi129 chuanqi129 added keep-going Don't stop on first failure, keep running tests until the end ciflow/xpu Run XPU CI tasks labels Oct 17, 2025
@mikaylagawarecki mikaylagawarecki added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Oct 17, 2025
@pytorch-bot pytorch-bot bot removed the ciflow/xpu Run XPU CI tasks label Oct 22, 2025
@guangyey
Copy link
Collaborator

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased yucai-conv1d-fix onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout yucai-conv1d-fix && git pull --rebase)

@chuanqi129 chuanqi129 linked an issue Oct 22, 2025 that may be closed by this pull request
@chuanqi129 chuanqi129 added the ciflow/xpu Run XPU CI tasks label Oct 24, 2025
@etaf etaf changed the title [Intel GPU] Fix conv1d precision error [xpu][fix] Fix conv1d precision error Oct 28, 2025
@pytorch-bot pytorch-bot bot removed the ciflow/xpu Run XPU CI tasks label Nov 3, 2025
@riverliuintel
Copy link

@EikanWang or @gujinghui can you please review this PR?

@chuanqi129 chuanqi129 added the ciflow/xpu Run XPU CI tasks label Nov 5, 2025
Copy link
Collaborator

@EikanWang EikanWang left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM. Pls. fix the CI failures.

@pytorch-bot pytorch-bot bot removed the ciflow/xpu Run XPU CI tasks label Nov 6, 2025
@etaf etaf added the ciflow/xpu Run XPU CI tasks label Nov 6, 2025
@CuiYifeng
Copy link
Contributor

@pytorchbot rebase

@pytorchmergebot
Copy link
Collaborator

@pytorchbot started a rebase job onto refs/remotes/origin/viable/strict. Check the current status here

@pytorchmergebot
Copy link
Collaborator

Successfully rebased yucai-conv1d-fix onto refs/remotes/origin/viable/strict, please pull locally before adding more changes (for example, via git checkout yucai-conv1d-fix && git pull --rebase)

@pytorch-bot pytorch-bot bot removed the ciflow/xpu Run XPU CI tasks label Nov 11, 2025
@chuanqi129 chuanqi129 added the ciflow/xpu Run XPU CI tasks label Nov 11, 2025
@pytorch-bot pytorch-bot bot removed the ciflow/xpu Run XPU CI tasks label Nov 12, 2025
@chuanqi129 chuanqi129 added the ciflow/xpu Run XPU CI tasks label Nov 12, 2025
@pytorch-bot pytorch-bot bot removed the ciflow/xpu Run XPU CI tasks label Nov 12, 2025
@EikanWang EikanWang added the ciflow/xpu Run XPU CI tasks label Nov 13, 2025
@EikanWang
Copy link
Collaborator

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Nov 13, 2025
@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

@pytorchmergebot
Copy link
Collaborator

Merge failed

Reason: 1 jobs have failed, first few of them are: trunk / linux-jammy-rocm-py3.10 / test (default, 1, 2, linux.rocm.gpu.gfx942.1)

Details for Dev Infra team Raised by workflow job

@chuanqi129
Copy link
Collaborator

@pytorchbot merge

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged once all checks pass (ETA 0-4 Hours).

Learn more about merging in the wiki.

Questions? Feedback? Please reach out to the PyTorch DevX Team

Advanced Debugging
Check the merge workflow status
here

Silv3S pushed a commit to Silv3S/pytorch that referenced this pull request Nov 18, 2025
Currently, conv1d converts the 3D view to 4D before calling onednn::convolution().
However, this function converts the 4D tensor to a channel-last memory format for computation, resulting in incorrect return results (the correct result should be channel-first).
This PR fixes this issue, ensuring that the output return value format is consistent with the expected format.

Pull Request resolved: pytorch#162944
Approved by: https://github.com/EikanWang
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

ciflow/trunk Trigger trunk jobs on your pull request ciflow/xpu Run XPU CI tasks keep-going Don't stop on first failure, keep running tests until the end Merged module: cpu CPU specific problem (e.g., perf, algorithm) open source release notes: xpu release notes category triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

conv1d precision error

10 participants