8000 [Intel GPU] allow_tf32 for oneDNN backend - XPU part by ZhiweiYan-96 · Pull Request #137570 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content

[Intel GPU] allow_tf32 for oneDNN backend - XPU part #137570

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 40 commits into from
Closed
Show file tree
Hide file tree
Changes from 1 commit
Commits
Show all changes
40 commits
Select commit Hold shift + click to select a range
7cb460c
Update
ZhiweiYan-96 Oct 9, 2024
aa6eb63
Update
ZhiweiYan-96 Oct 12, 2024
ac3000e
Update
ZhiweiYan-96 Oct 15, 2024
7c7f5bd
Update
ZhiweiYan-96 Oct 16, 2024
a7ecf30
Update
ZhiweiYan-96 Oct 17, 2024
e14a980
Update
ZhiweiYan-96 Oct 17, 2024
48d0530
Update
ZhiweiYan-96 Oct 17, 2024
d9ab777
Update
ZhiweiYan-96 Oct 21, 2024
b6e6e4e
Update
ZhiweiYan-96 Oct 26, 2024
5a6f59a
Update
ZhiweiYan-96 Oct 28, 2024
60fb9f7
Update
ZhiweiYan-96 Oct 29, 2024
3bea915
Update
ZhiweiYan-96 Nov 13, 2024
06d1680
Update
ZhiweiYan-96 Nov 13, 2024
bf3c110
Update
ZhiweiYan-96 Nov 13, 2024
8e74b7c
Update
ZhiweiYan-96 Nov 14, 2024
2e0f344
Update
ZhiweiYan-96 Nov 20, 2024
4bc77f8
Update
ZhiweiYan-96 Nov 27, 2024
2c667ac
Update
ZhiweiYan-96 Nov 27, 2024
bc921a5
Update
ZhiweiYan-96 Nov 27, 2024
f0d657e
Update
ZhiweiYan-96 Nov 28, 2024
ab586cd
Update
ZhiweiYan-96 Dec 4, 2024
b91414a
Update
ZhiweiYan-96 Dec 5, 2024
6ce003d
Update
ZhiweiYan-96 Dec 5, 2024
c159f6b
Update
ZhiweiYan-96 Dec 5, 2024
0112cb7
Update
ZhiweiYan-96 Dec 6, 2024
4a6ac2d
Update
ZhiweiYan-96 Dec 11, 2024
ea9e69b
Update
ZhiweiYan-96 Dec 12, 2024
6c87ae6
Update
ZhiweiYan-96 Dec 17, 2024
198cc01
Update
ZhiweiYan-96 Dec 18, 2024
ea08036
Update
ZhiweiYan-96 Dec 20, 2024
913e675
Update
ZhiweiYan-96 Dec 23, 2024
5c6fac3
Update
ZhiweiYan-96 Dec 25, 2024
f95ada4
Update
ZhiweiYan-96 Dec 30, 2024
096fd09
Update
ZhiweiYan-96 Jan 6, 2025
689dadf
Update
ZhiweiYan-96 Jan 7, 2025
5f7d0e7
Update
ZhiweiYan-96 Jan 9, 2025
fb2a6c4
Update
ZhiweiYan-96 Jan 20, 2025
80ea731
Update
ZhiweiYan-96 Feb 12, 2025
bbad26b
Update
guangyey Feb 15, 2025
cc3eefe
Update
ZhiweiYan-96 Feb 16, 2025
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
Prev Previous commit
Next Next commit
Update
[ghstack-poisoned]
  • Loading branch 8000 information
ZhiweiYan-96 committed Nov 13, 2024
commit bf3c1105d25c5de9f8717defe86f9d0836637603
6 changes: 3 additions & 3 deletions aten/src/ATen/native/mkldnn/xpu/detail/Conv.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -122,7 +122,7 @@ sycl::event convolution(

auto& ctx = at::globalContext();
bool allow_tf32 = ctx.allowTF32Onednn();
if(allow_tf32) {
if (allow_tf32) {
pattr.set_fpmath_mode(dnnl::fpmath_mode::tf32);
}

Expand Down Expand Up @@ -219,7 +219,7 @@ sycl::event convolution_backward_weights(

auto& ctx = at::globalContext();
bool allow_tf32 = ctx.allowTF32Onednn();
Copy link
Collaborator

Choose a reason for hiding this comment

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

Onednn -> OneDNN

Copy link
Collaborator

Choose a reason for hiding this comment

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

In oneDNN github https://github.com/oneapi-src/oneDNN, it uses oneDNN. Is it better to all use oneDNN?

Copy link
Collaborator

Choose a reason for hiding this comment

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

@yanbing-j , Personally, I think oneDNN is a better one as the CUDA name is also in the way of allowTF32CuDNN and oneDNN is the project name. However, it should not be a big deal because the naming style in C++ is not user-facing. You can make the decision to align the style between CPU and GPU.

Copy link
Collaborator Author

Choose a reason for hiding this comment

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

hi, @EikanWang @yanbing-j , I've changed Onednn to oneDNN. I think using the project name oneDNN is easier for us to align naming style.

if(allow_tf32) {
if (allow_tf32) {
pattr.set_fpmath_mode(dnnl::fpmath_mode::tf32);
}

Expand Down Expand Up @@ -334,7 +334,7 @@ sycl::event convolution_backward_data(

auto& ctx = at::globalContext();
bool allow_tf32 = ctx.allowTF32Onednn();
if(allow_tf32) {
if (allow_tf32) {
pattr.set_fpmath_mode(dnnl::fpmath_mode::tf32);
}

Expand Down
2 changes: 1 addition & 1 deletion torch/csrc/Module.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -926,7 +926,7 @@ static PyObject* THPModule_setAllowTF32Onednn(
HANDLE_TH_ERRORS
TORCH_CHECK(
PyBool_Check(arg),
"set_allow_tf32_onednn expects a bool, "
"_set_onednn_allow_tf32 expects a bool, "
"but got ",
THPUtils_typename(arg));
at::globalContext().setAllowTF32Onednn(arg == Py_True);
Expand Down
Loading
0