8000 [Intel GPU] trigger tf32 no-gpu warn only when setting true by ZhiweiYan-96 · Pull Request #149926 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[Intel GPU] trigger tf32 no-gpu warn only when setting true #149926

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

Closed
wants to merge 6 commits into from
Closed
Changes from 1 commit
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Next Next commit
Update
[ghstack-poisoned]
  • Loading branch information
ZhiweiYan-96 committed Mar 25, 2025
commit c844b230727554d207f28700505b09c0689cfe3e
4 changes: 3 additions & 1 deletion aten/src/ATen/Context.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -145,7 +145,9 @@ void Context::setAllowTF32OneDNN(bool b){
#ifdef USE_XPU
allow_tf32_onednn = b;
#else
TORCH_WARN("TF32 acceleration on top of oneDNN is available for Intel GPUs. The current Torch version does not have Intel GPU Support.");
if(b){
Copy link
Collaborator

Choose a reason for hiding this comment

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

Suggested change
if(b){
if (b) {

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix the lint.

Copy link
Collaborator
@EikanWang EikanWang Mar 25, 2025

Choose a reason for hiding this comment

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

Why is the lint issue not captured?

Copy link
Collaborator Author
@ZhiweiYan-96 ZhiweiYan-96 Mar 25, 2025

Choose a reason for hiding this comment

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

Please fix the lint.

I wrongly thought you use some git button to fix the lint issue since you resolve the comment... hah, I will fix them, thanks for reminding.

Why is the lint issue not captured?

@EikanWang this file is not in .lintrunner.toml . (You may see other if(b) like case in this file) . Maybe this is a choice of other maintainers...

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

fixed in the new commit

Copy link
Collaborator
@guangyey guangyey Mar 26, 2025

Choose a reason for hiding this comment

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

No. Refer to

pytorch/.lintrunner.toml

Lines 55 to 57 in a8d0c5c

code = 'CLANGFORMAT'
include_patterns = [
'aten/src/ATen/*.h',
, all .cpp files in aten/src/ATen are NOT included from clangformat.

Copy link
Collaborator

Choose a reason for hiding this comment

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

Please fix the lint.

I wrongly thought you use some git button to fix the lint issue since you resolve the comment... hah, I will fix them, thanks for reminding.

Haha, just a reminder. I will break the ghstack merge label if I use the git button. So I revert my patch.

TORCH_WARN("TF32 acceleration on top of oneDNN is available for Intel GPUs. The current Torch version does not have Intel GPU Support.");
}
#endif
}

Expand Down
Loading
0