Skip to content

Add a new API torch.xpu.is_tf32_supported for Intel GPU#163141

Closed
guangyey wants to merge 9 commits intogh/guangyey/210/basefrom
gh/guangyey/210/head
Closed

Add a new API torch.xpu.is_tf32_supported for Intel GPU#163141
guangyey wants to merge 9 commits intogh/guangyey/210/basefrom
gh/guangyey/210/head

Conversation

@guangyey
Copy link
Collaborator

@guangyey guangyey commented Sep 17, 2025

Stack from ghstack (oldest at bottom):

Motivation

Aligned with other backends, this PR introduces a new API torch.xpu.is_tf32_supported, which should be used before torch.backends.mkldnn.allow_tf32=True or provide hardware capability information to the Triton

Additional Context

On Intel Xe architecture and newer, TF32 operations can be accelerated through DPAS (Dot Product Accumulate Systolic) instructions. Therefore, TF32 support can be determined by checking whether the device supports subgroup matrix multiply-accumulate operations.

@pytorch-bot
Copy link

pytorch-bot bot commented Sep 17, 2025

🔗 Helpful Links

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

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

❗ 2 Active SEVs

There are 2 currently active SEVs. If your PR is affected, please view them below:

❌ 1 Cancelled Job, 1 Unrelated Failure

As of commit 2756be2 with merge base 12d7cc5 (image):

CANCELLED JOB - The following job was cancelled. Please retry:

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

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

guangyey added a commit that referenced this pull request Sep 17, 2025
ghstack-source-id: c080583
Pull Request resolved: #163141
@guangyey guangyey marked this pull request as draft September 17, 2025 03:41
@guangyey guangyey changed the title Add a new API torch.xpu.is_tf32_support for Intel GPU [WIP] Add a new API torch.xpu.is_tf32_support for Intel GPU Sep 17, 2025
@guangyey guangyey added ciflow/xpu Run XPU CI tasks release notes: xpu release notes category labels Sep 17, 2025
@guangyey guangyey changed the title [WIP] Add a new API torch.xpu.is_tf32_support for Intel GPU [WIP] Add a new API torch.xpu.is_tf32_supported for Intel GPU Sep 17, 2025
guangyey added a commit that referenced this pull request Sep 17, 2025
ghstack-source-id: 1e68379
Pull Request resolved: #163141
[ghstack-poisoned]
[ghstack-poisoned]
guangyey added a commit that referenced this pull request Sep 18, 2025
ghstack-source-id: 6ec959b
Pull Request resolved: #163141
[ghstack-poisoned]
@guangyey guangyey changed the title [WIP] Add a new API torch.xpu.is_tf32_supported for Intel GPU Add a new API torch.xpu.is_tf32_supported for Intel GPU Sep 19, 2025
@guangyey guangyey marked this pull request as ready for review September 19, 2025 03:09
guangyey added a commit that referenced this pull request Sep 19, 2025
ghstack-source-id: 272f360
Pull Request resolved: #163141
guangyey added a commit that referenced this pull request Sep 19, 2025
ghstack-source-id: 5ae6dc7
Pull Request resolved: #163141
@guangyey guangyey requested review from albanD and ezyang September 19, 2025 03:30
@guangyey guangyey moved this to Review Required in PyTorch Intel Sep 19, 2025
[ghstack-poisoned]
[ghstack-poisoned]
@guangyey guangyey marked this pull request as draft September 19, 2025 16:52
guangyey added a commit that referenced this pull request Oct 11, 2025
ghstack-source-id: 939dc67
Pull Request resolved: #163141
guangyey added a commit that referenced this pull request Oct 11, 2025
ghstack-source-id: dd1ccb5
Pull Request resolved: #163141
@guangyey guangyey marked this pull request as ready for review October 11, 2025 13:03
guangyey added a commit that referenced this pull request Oct 11, 2025
ghstack-source-id: d980aaa
Pull Request resolved: #163141
@guangyey
Copy link
Collaborator Author

@pytorchbot merge

@pytorch-bot pytorch-bot bot added the ciflow/trunk Trigger trunk jobs on your pull request label Oct 11, 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

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

[ghstack-poisoned]
[ghstack-poisoned]
[ghstack-poisoned]
guangyey added a commit that referenced this pull request Oct 12, 2025
ghstack-source-id: 621b8c3
Pull Request resolved: #163141
@guangyey
Copy link
Collaborator Author

@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

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

[ghstack-poisoned]
@guangyey
Copy link
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 1 checks: xpu / linux-jammy-xpu-n-py3.10 / test (default, 2, 8, linux.idc.xpu)

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

@guangyey
Copy link
Collaborator Author

@pytorchbot merge -i

@pytorchmergebot
Copy link
Collaborator

The merge job was canceled or timed out. This most often happen if two merge requests were issued for the same PR, or if merge job was waiting for more than 6 hours for tests to finish. In later case, please do not hesitate to reissue the merge command
For more information see pytorch-bot wiki.

@pytorchmergebot
Copy link
Collaborator

Merge started

Your change will be merged while ignoring the following 2 checks: trunk / macos-py3-arm64 / build, xpu / linux-jammy-xpu-n-py3.10 / test (default, 2, 8, linux.idc.xpu)

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

@github-project-automation github-project-automation bot moved this from Review Required to Done in PyTorch Intel Oct 12, 2025
Chao1Han pushed a commit to Chao1Han/pytorch that referenced this pull request Oct 21, 2025
# Motivation
Aligned with other backends, this PR introduces a new API `torch.xpu.is_tf32_supported`, which should be used before `torch.backends.mkldnn.allow_tf32=True` or provide hardware capability information to the Triton

# Additional Context
On Intel Xe architecture and newer, TF32 operations can be accelerated through DPAS (Dot Product Accumulate Systolic) instructions. Therefore, TF32 support can be determined by checking whether the device supports subgroup matrix multiply-accumulate operations.
Pull Request resolved: pytorch#163141
Approved by: https://github.com/EikanWang
@github-actions github-actions bot deleted the gh/guangyey/210/head branch November 12, 2025 02:15
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 Merged open source release notes: xpu release notes category

Projects

Archived in project

Development

Successfully merging this pull request may close these issues.

4 participants