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’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

IPEX v2.1.20+xpu LLVM error #578

Closed
simonlui opened this issue Mar 30, 2024 · 4 comments
Closed

IPEX v2.1.20+xpu LLVM error #578

simonlui opened this issue Mar 30, 2024 · 4 comments
Labels
XPU/GPU XPU/GPU specific issues

Comments

@simonlui
Copy link

simonlui commented Mar 30, 2024

Describe the bug

If you work around #577 and don't offload the SDXL CLIP text encoder to GPU by running everything default, you will hit the following error instead. This was working with again, with commit d9455e8 so this is a recent issue from the changes that were put in afterwards before the release of IPEX v2.1.20+xpu.

got prompt
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
Requested to load SDXLRefinerClipModel
Loading 1 new model
/deps/venv/lib/python3.10/site-packages/intel_extension_for_pytorch/frontend.py:465: UserWarning: Conv BatchNorm folding failed during the optimize process.
  warnings.warn(
/deps/venv/lib/python3.10/site-packages/intel_extension_for_pytorch/frontend.py:472: UserWarning: Linear BatchNorm folding failed during the optimize process.
  warnings.warn(
model_type EPS
Using pytorch attention in VAE
Using pytorch attention in VAE
clip missing: ['clip_l.logit_scale', 'clip_l.transformer.text_projection.weight']
Requested to load SDXLClipModel
Loading 1 new model
Requested to load SDXL
Loading 1 new model
  0%|                                                                                                                                                                                                                                                                                                                                                                                                                                                                  | 0/20 [00:00<?, ?it/s]
error: LLVM ERROR: GenXLegalization failed for: <  %.esimd219 = tail call <64 x i64> @llvm.genx.lsc.load.slm.v64i64.v1i1.v1i32(<1 x i1> <i1 true>, i8 0, i8 0, i8 0, i16 1, i32 0, i8 4, i8 8, i8 2, i8 0, <1 x i32> %109, i32 0)>: Transposed LSC instruction vector size is too large
Aborted (core dumped)

Versions

PyTorch version: 2.1.0.post0+cxx11.abi
PyTorch CXX11 ABI: Yes
IPEX version: 2.1.20+xpu
IPEX commit: https://github.com/intel/intel-extension-for-pytorch/commit/b78b4d97e2f3614328fc2a9947f4e0db9e816f66
Build type: Release

OS: Ubuntu 22.04.4 LTS (x86_64)
GCC version: N/A
Clang version: N/A
IGC version: N/A
CMake version: version 3.28.4
Libc version: glibc-2.35

Python version: 3.10.12 (main, Nov 20 2023, 15:14:05) [GCC 11.4.0] (64-bit runtime)
Python platform: Linux-6.7.10-200.fc39.x86_64-x86_64-with-glibc2.35
Is XPU available: True
DPCPP runtime version: N/A
MKL version: N/A
GPU models and configuration:
[0] _DeviceProperties(name='Intel(R) Arc(TM) A770 Graphics', platform_name='Intel(R) Level-Zero', dev_type='gpu, support_fp64=1, total_memory=16288MB, max_compute_units=512, gpu_eu_count=512)
Intel OpenCL ICD version: 23.17.26241.33-64722.04
Level Zero version: 1.3.26241.33-64722.04

CPU:
Architecture: x86_64
CPU op-mode(s): 32-bit, 64-bit
Address sizes: 48 bits physical, 48 bits virtual
Byte Order: Little Endian
CPU(s): 32
On-line CPU(s) list: 0-31
Vendor ID: AuthenticAMD
Model name: AMD Ryzen 9 5950X 16-Core Processor
CPU family: 25
Model: 33
Thread(s) per core: 2
Core(s) per socket: 16
Socket(s): 1
Stepping: 0
Frequency boost: enabled
CPU max MHz: 5084.0000
CPU min MHz: 550.0000
BogoMIPS: 6800.37
Flags: fpu vme de pse tsc msr pae mce cx8 apic sep mtrr pge mca cmov pat pse36 clflush mmx fxsr sse sse2 ht syscall nx mmxext fxsr_opt pdpe1gb rdtscp lm constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid aperfmperf rapl pni pclmulqdq monitor ssse3 fma cx16 sse4_1 sse4_2 x2apic movbe popcnt aes xsave avx f16c rdrand lahf_lm cmp_legacy svm extapic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt tce topoext perfctr_core perfctr_nb bpext perfctr_llc mwaitx cpb cat_l3 cdp_l3 hw_pstate ssbd mba ibrs ibpb stibp vmmcall fsgsbase bmi1 avx2 smep bmi2 erms invpcid cqm rdt_a rdseed adx smap clflushopt clwb sha_ni xsaveopt xsavec xgetbv1 xsaves cqm_llc cqm_occup_llc cqm_mbm_total cqm_mbm_local user_shstk clzero irperf xsaveerptr rdpru wbnoinvd arat npt lbrv svm_lock nrip_save tsc_scale vmcb_clean flushbyasid decodeassists pausefilter pfthreshold avic v_vmsave_vmload vgif v_spec_ctrl umip pku ospke vaes vpclmulqdq rdpid overflow_recov succor smca fsrm debug_swap
Virtualization: AMD-V
L1d cache: 512 KiB (16 instances)
L1i cache: 512 KiB (16 instances)
L2 cache: 8 MiB (16 instances)
L3 cache: 64 MiB (2 instances)
NUMA node(s): 1
NUMA node0 CPU(s): 0-31
Vulnerability Gather data sampling: Not affected
Vulnerability Itlb multihit: Not affected
Vulnerability L1tf: Not affected
Vulnerability Mds: Not affected
Vulnerability Meltdown: Not affected
Vulnerability Mmio stale data: Not affected
Vulnerability Reg file data sampling: Not affected
Vulnerability Retbleed: Not affected
Vulnerability Spec rstack overflow: Vulnerable: Safe RET, no microcode
Vulnerability Spec store bypass: Mitigation; Speculative Store Bypass disabled via prctl
Vulnerability Spectre v1: Mitigation; usercopy/swapgs barriers and __user pointer sanitization
Vulnerability Spectre v2: Mitigation; Retpolines, IBPB conditional, IBRS_FW, STIBP always-on, RSB filling, PBRSB-eIBRS Not affected
Vulnerability Srbds: Not affected
Vulnerability Tsx async abort: Not affected

Versions of relevant libraries:
[pip3] intel-extension-for-pytorch==2.1.20+xpu
[pip3] numpy==1.24.4
[pip3] open-clip-torch==2.24.0
[pip3] torch==2.1.0.post0+cxx11.abi
[pip3] torchaudio==2.1.0.post0+cxx11.abi
[pip3] torchsde==0.2.6
[pip3] torchvision==0.16.0.post0+cxx11.abi
[conda] N/A
@Vasud-ha
Copy link

Vasud-ha commented Apr 2, 2024

Hi @simonlui, thanks for sharing the update, we will check and get back to you.

@simonlui
Copy link
Author

Whatever was broken got seems to have been fixed by a custom build of xpu-main using 78fe3c2 but I am concerned about the fact that I am the only one verifying if the fix is accurate. If you don't mind, I want to keep open for the time being to do some extra verification that it's not a setup-specific fix that may be making it unbroken for my custom builds and not with a commit specifically. I want to actually rebuild the release version of IPEX v2.1.20+xpu to see if it is actually broken.

@simonlui
Copy link
Author

simonlui commented Apr 22, 2024

I can confirm that a compiled version of v2.1.20+xpu with my setup does replicate the original issue so it's not my setup that would've fixed the issue but one of the commits leading up to 78fe3c2 from the tagged v2.1.20+xpu. Closing.

@Vasud-ha
Copy link

@simonlui, Thanks for sharing the updates.

@ZhaoqiongZ ZhaoqiongZ added the XPU/GPU XPU/GPU specific issues label Apr 24, 2024
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
XPU/GPU XPU/GPU specific issues
Projects
None yet
Development

No branches or pull requests

3 participants