Skip to content
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鈥檒l occasionally send you account related emails.

Already on GitHub? Sign in to your account

Inductor compile failed with enabling debug log #112690

Closed
leslie-fang-intel opened this issue Nov 2, 2023 · 3 comments
Closed

Inductor compile failed with enabling debug log #112690

leslie-fang-intel opened this issue Nov 2, 2023 · 3 comments
Assignees
Labels
module: inductor oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module

Comments

@leslie-fang-intel
Copy link
Collaborator

leslie-fang-intel commented Nov 2, 2023

馃悰 Describe the bug

Here is the script to reproduce this failure

  • It passes when debug log disabled: TORCHINDUCTOR_FREEZING=1 python inductor_debug_mode_failure.py
  • It failed when enable debug log: TORCHINDUCTOR_FREEZING=1 TORCH_COMPILE_DEBUG=1 TORCH_LOGS="+output_code" python inductor_debug_mode_failure.py

Detail failure msg as:

  File "/home/lesliefang/pytorch_1_7_1/quantization/pytorch/torch/_inductor/scheduler.py", line 1191, in __init__
    V.debug.ir_post_fusion(self.nodes)
  File "/home/lesliefang/pytorch_1_7_1/quantization/pytorch/torch/_inductor/debug.py", line 453, in ir_post_fusion
    self._write_ir("ir_post_fusion.txt", nodes)
  File "/home/lesliefang/pytorch_1_7_1/quantization/pytorch/torch/_inductor/debug.py", line 459, in _write_ir
    fd.write(node.debug_str())
  File "/home/lesliefang/pytorch_1_7_1/quantization/pytorch/torch/_inductor/scheduler.py", line 106, in debug_str
    f"{name}: {type(self).__name__}({type(self.node).__name__})",
torch._dynamo.exc.BackendCompilerFailed: backend='inductor' raised:
AttributeError: 'FusedSchedulerNode' object has no attribute 'node'

Narrow down to 6ab1121 which causes this failure. Looks like FusedSchedulerNode.node (

self.node: ir.Buffer
) is un-initialized after this commit.

Versions

Collecting environment information...
PyTorch version: 2.2.0a0+git69a28e7
Is debug build: False
CUDA used to build PyTorch: None
ROCM used to build PyTorch: N/A

OS: CentOS Linux 7 (Core) (x86_64)
GCC version: (GCC) 11.2.1 20210728 (Red Hat 11.2.1-1)
Clang version: Could not collect
CMake version: version 3.26.4
Libc version: glibc-2.17

Python version: 3.9.10 (main, Mar  2 2022, 12:02:00)  [GCC 9.3.0] (64-bit runtime)
Python platform: Linux-4.19.5-1.el7.elrepo.x86_64-x86_64-with-glibc2.17
Is CUDA available: False
CUDA runtime version: No CUDA
CUDA_MODULE_LOADING set to: N/A
GPU models and configuration: No CUDA
Nvidia driver version: No CUDA
cuDNN version: No CUDA
HIP runtime version: N/A
MIOpen runtime version: N/A
Is XNNPACK available: True

CPU:
Architecture:          x86_64
CPU op-mode(s):        32-bit, 64-bit
Byte Order:            Little Endian
CPU(s):                56
On-line CPU(s) list:   0-55
Thread(s) per core:    1
Core(s) per socket:    28
Socket(s):             2
NUMA node(s):          2
Vendor ID:             GenuineIntel
CPU family:            6
Model:                 85
Model name:            Intel Genuine CPU
Stepping:              10
CPU MHz:               1678.401
CPU max MHz:           2900.0000
CPU min MHz:           1200.0000
BogoMIPS:              5800.00
Virtualization:        VT-x
L1d cache:             32K
L1i cache:             32K
L2 cache:              1024K
L3 cache:              39424K
NUMA node0 CPU(s):     0-27
NUMA node1 CPU(s):     28-55
Flags:                 fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush dts acpi mmx fxsr sse sse2 ss ht tm pbe syscall nx pdpe1gb rdtscp lm constant_tsc art arch_perfmon pebs bts rep_good nopl xtopology nonstop_tsc cpuid aperfmperf pni pclmulqdq dtes64 monitor ds_cpl vmx smx est tm2 ssse3 sdbg fma cx16 xtpr pdcm pcid dca sse4_1 sse4_2 x2apic movbe popcnt tsc_deadline_timer aes xsave avx f16c rdrand lahf_lm abm 3dnowprefetch cpuid_fault epb cat_l3 cdp_l3 invpcid_single intel_ppin ssbd mba ibrs ibpb stibp ibrs_enhanced tpr_shadow vnmi flexpriority ept vpid ept_ad fsgsbase tsc_adjust bmi1 hle avx2 smep bmi2 erms invpcid rtm cqm mpx rdt_a avx512f avx512dq rdseed adx smap clflushopt clwb intel_pt avx512cd avx512bw avx512vl xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local dtherm arat pln pts hwp hwp_act_window hwp_epp hwp_pkg_req pku ospke avx512_vnni flush_l1d arch_capabilities

Versions of relevant libraries:
[pip3] flake8==6.0.0
[pip3] flake8-bugbear==23.3.23
[pip3] flake8-coding==1.3.3
[pip3] flake8-comprehensions==3.12.0
[pip3] flake8-executable==2.1.3
[pip3] flake8-logging-format==0.9.0
[pip3] flake8-pyi==23.3.1
[pip3] flake8-simplify==0.19.3
[pip3] intel-extension-for-pytorch==2.2.0+git2341961
[pip3] mypy==1.4.1
[pip3] mypy-extensions==1.0.0
[pip3] numpy==1.24.3
[pip3] torch==2.2.0a0+git6ab1121
[pip3] torchvision==0.16.0a0+370134
[pip3] triton==2.0.0
[conda] mkl                       2023.0.0            intel_25398    intel
[conda] mkl-include               2023.0.0            intel_25398    intel
[conda] mkl-include               2023.0.0                  <pip>
[conda] mkl-service               2.4.0           py39h3605609_14    intel
[conda] mkl-static                2023.0.0                  <pip>
[conda] mkl_fft                   1.3.1           py39hcab1719_22    intel
[conda] mkl_random                1.2.2           py39hbf47bc3_22    intel
[conda] mkl_umath                 0.1.1           py39hf66a691_32    intel
[conda] numpy                     1.22.3           py39hf0956d0_5    intel
[conda] numpy                     1.24.3                    <pip>
[conda] numpy-base                1.22.3           py39h45c9ace_5    intel
[conda] torchvision               0.16.0a0+370134           <pip>
[conda] triton                    2.0.0                     <pip>

cc @ezyang @msaroufim @wconstab @bdhirsh @anijain2305 @zou3519 @voznesenskym @penguinwu @EikanWang @jgong5 @Guobing-Chen @XiaobingSuper @zhuhaozhe @blzheng @wenzhe-nrv @jiayisunx @peterbell10 @ipiszy @yf225 @chenyang78 @kadeng @muchulee8 @aakhundov @ColinPeppler

@leslie-fang-intel
Copy link
Collaborator Author

Hi @ipiszy, Could you help to take a look of this issue?

@leslie-fang-intel leslie-fang-intel changed the title Inductor with Debug log failure Inductor compile failed with enabling debug log Nov 2, 2023
@ipiszy
Copy link
Contributor

ipiszy commented Nov 3, 2023

Thanks for creating the issue! Yes I don't want to initialize self.node to work around some mypy failures related to Optional. Will work on a fix.

@davidberard98 davidberard98 added the triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module label Nov 3, 2023
@ipiszy ipiszy linked a pull request Nov 3, 2023 that will close this issue
@leslie-fang-intel
Copy link
Collaborator Author

Thanks @ipiszy for the fix. Close this ticket since #112917 merged.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
module: inductor oncall: pt2 triaged This issue has been looked at a team member, and triaged and prioritized into an appropriate module
Projects
None yet
Development

Successfully merging a pull request may close this issue.

4 participants