-
Notifications
You must be signed in to change notification settings - Fork 271
UserWarning: aten::layer_norm has no autograd kernel registered #801
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
Comments
Hi, would you share how to reproduce the error you met? |
Took me a while but I could recreate a reproducible example, I've added it to the original post |
I tried to set up the env on 3 servers with different CPUs, including a similar server (Intel(R) Xeon(R) Gold 6238M CPU) with cuda version torch==2.6.0, as well as ipex==2.6.0. However I don't get the warning message on any of them.
May I know how you installed torch? Using |
Thanks a lot, I've also tried on two different machines before. I am not sure what exactly is causing it, I've created a reproducible example here: https://colab.research.google.com/drive/1u_tw4anVRCbAcBoJTm22kWcg4gvyjdLS?usp=sharing Maybe it's one of the other deps? But this still should not cause torch to emit a warning I think? It doesn't seem to block anything, but then I don't know either if it's just ignoring this layer in the backpropagation |
I am aware that you installed but did not import IPEX in the example code. Would you try without ipex package (pip uninstall intel_extension_for_pytorch)? If the warning persists, you can raise the ticket to PyTorch issue. Thanks. |
@ZailiWang the issue does not persist. I was maybe unclear about this. That's why I raised the issue here: it only happens if the intel extension installed. The exact same code with pure pytorch does not raise an error. While IPEX is not imported, it still changes the execution? I find a factor of two speedup when installing the extension |
Oh, I see. So I should re-try the reproduction code with |
I think it's rather because I've also installed some other packages. Maybe there is some weird interference going on? But it's only |
I checked that layer_norm backward is registered in PyTorch rel 2.6, and IPEX should not fuse/fold the backward op, so it's basically not understandable why this message can be echoed in your env. It's also hardly possible that torch-geometric could change PyTorch op registration status. Maybe we can wait a few days for PyTorch 2.7 release and check if the message persists in PT2.7. |
Describe the bug
When training a GNN using pytorch, and using the LayerNorm from pytorch, I get the warning
Reproducable example
As using the functional layer_norm could be the issue, you can change it in the init. Gives warning for both.
Versions
Collecting environment information...
PyTorch version: 2.6.0+cu124
PyTorch CXX11 ABI: No
IPEX version: 2.6.0+cpu
IPEX commit: 4784d0d
Build type: Release
OS: Ubuntu 20.04.6 LTS (x86_64)
GCC version: (Ubuntu 9.4.0-1ubuntu1~20.04.2) 9.4.0
Clang version: 10.0.0-4ubuntu1
IGC version: N/A
CMake version: version 3.16.3
Libc version: glibc-2.31
Python version: 3.11.9 | Intel Corporation | (main, Sep 9 2024, 23:42:49) [GCC 14.1.0] (64-bit runtime)
Python platform: Linux-5.4.0-208-generic-x86_64-with-glibc2.31
Is XPU available: False
DPCPP runtime: N/A
MKL version: N/A
GPU models and configuration onboard:
N/A
GPU models and configuration detected:
N/A
Driver version:
CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Byte Order: Little Endian
Address sizes: 45 bits physical, 48 bits virtual
CPU(s): 20
On-line CPU(s) list: 0-19
Thread(s) per core: 1
Core(s) per socket: 1
Socket(s): 20
NUMA node(s): 1
Vendor ID: GenuineIntel
CPU family: 6
Model: 85
Model name: Intel(R) Xeon(R) Platinum 8260 CPU @ 2.40GHz
Stepping: 7
CPU MHz: 2394.374
BogoMIPS: 4788.74
Hypervisor vendor: VMware
Virtualization type: full
L1d cache: 640 KiB
L1i cache: 640 KiB
L2 cache: 20 MiB
L3 cache: 715 MiB
NUMA node0 CPU(s): 0-19
Vulnerability Gather data sampling: Unknown: Dependent on hypervisor status
Vulnerability Itlb multihit: KVM: Vulnerable
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Vulnerable: Clear CPU buffers attempted, no microcode; SMT Host state unknown
Vulnerability Retbleed: Mitigation; Enhanced IBRS
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl and seccomp
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Enhanced / Automatic IBRS; IBPB conditional; RSB filling; PBRSB-eIBRS SW sequence; BHI SW loop, KVM SW loop
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ss syscall nx pdpe1gb rdtscp lm constant_tsc arch_perfmon nopl xtopology tsc_reliable nonstop_tsc cpuid pni pclmulqdq ssse3 fma cx16 pcid sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand hypervisor lahf_lm abm 3dnowprefetch invpcid_single ssbd ibrs ibpb stibp ibrs_enhanced fsgsbase tsc_adjust bmi1 avx2 smep bmi2 invpcid avx512f avx512dq rdseed adx smap clflushopt clwb avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves arat pku ospke avx512_vnni md_clear flush_l1d arch_capabilities
Versions of relevant libraries:
[conda] intel-extension-for-pytorch 2.6.0 pypi_0 pypi
[conda] numpy 2.2.4 pypi_0 pypi
[conda] nvidia-cuda-cupti-cu12 12.4.127 pypi_0 pypi
[conda] nvidia-nccl-cu12 2.21.5 pypi_0 pypi
[conda] oneccl-bind-pt 2.6.0+cpu pypi_0 pypi
[conda] python 3.11.9 h2324612_8_cpython https://software.repos.intel.com/python/conda
[conda] pytorch-lightning 2.5.0.post0 pypi_0 pypi
[conda] torch 2.6.0 pypi_0 pypi
[conda] torch-geometric 2.6.1 pypi_0 pypi
[conda] torchmetrics 1.6.3 pypi_0 pypi
The text was updated successfully, but these errors were encountered: