8000 Pytorch 2.1.X SIGILL on CPUs that do not support SSE4.1 · Issue #116623 · pytorch/pytorch · GitHub
[go: up one dir, main page]

Skip to content
Pytorch 2.1.X SIGILL on CPUs that do not support SSE4.1 #116623
@fpoisson35

Description

@fpoisson35

🐛 Describe the bug

Hello,

I'm trying to run the latest code of librephotos project (librephotos-docker) where its backend container use Python3 with pytorch release 2.1.2 on my server with CPU AMD Turion(tm) II Neo N54L Dual-Core Processor.

My issue is Python3 which end with SIGILL instruction when i just try to import torch.

The docker file which is a small copy from this docker file librephotos backend Dockerfile i only add lldb:

FROM ubuntu:lunar
ARG TARGETPLATFORM
ENV DEBIAN_FRONTEND=noninteractive
RUN apt-get update \
  && apt-get install -y python3-pip python3-dev \
  && cd /usr/local/bin \
  && ln -s /usr/bin/python3 python \
  && pip3 install --upgrade --break-system-packages pip \
  && apt-get clean \
  && rm -rf /var/lib/apt/lists/*
RUN apt-get update && \
    apt-get install -y --no-install-recommends \
		build-essential \
		bzip2 \
		brotli \
		curl \
		ffmpeg \
		git \
		libboost-all-dev \
		libcfitsio-dev \ 
		libexif-dev \
		libexpat-dev \
		libexpat1-dev \ 
		libgif-dev \
		libgl1-mesa-glx \
		libglib2.0-dev \
		libgsf-1-dev \ 
		libheif-dev \
		libimage-exiftool-perl \
		libimagequant-dev \
		libjpeg-dev \
		liblapack-dev \
		liblcms2-dev \
		libmagic1 \
		libopenblas-dev \
		libopenexr-dev \ 
		liborc-dev \
		libpng-dev \
		libpq-dev \
		librsvg2-dev \
		libsm6 \
		libtiff5-dev \ 
		libtool \ 
		libtool-bin \
		libwebp-dev \
		libxrender-dev \
		pkg-config \ 
		rustc \
		cargo \
		libtinfo5 \
		libjxl-dev \
		libvips-dev \
		gdb \
		lldb \
		swig && \
    apt-get clean && \
    rm -rf /var/lib/apt/lists/*
RUN pip3 install --no-cache-dir --break-system-packages torch torchvision --extra-index-url https://download.pytorch.org/whl/cpu

Now when i run the docker instance with the lldb i have these errors, i gave also lscpu information which do not support AVX nor AVX2):

# docker run --cap-add=SYS_PTRACE --security-opt seccomp=unconfined -it backend-perso /bin/bash
root@53bb057b6d46:/# lldb -- python3 -c "import torch"
(lldb) target create "python3"
Current executable set to '/usr/bin/python3' (x86_64).
(lldb) settings set -- target.run-args  "-c" "import torch"
(lldb) run
Process 15 launched: '/usr/bin/python3' (x86_64)
Process 15 stopped
* thread #1, name = 'python3', stop reason = signal SIGILL: illegal instruction operand
    frame #0: 0x00007fffefc031f2 libtorch_cpu.so`void std::vector<dnnl_post_ops::entry_t, std::allocator<dnnl_post_ops::entry_t>>::_M_realloc_insert<>(__gnu_cxx::__normal_iterator<dnnl_post_ops::entry_t*, std::vector<dnnl_post_ops::entry_t, std::allocator<dnnl_post_ops::entry_t>>>) + 450
libtorch_cpu.so`std::vector<dnnl_post_ops::entry_t, std::allocator<dnnl_post_ops::entry_t>>::_M_realloc_insert<>:
->  0x7fffefc031f2 <+450>: pinsrq $0x1, %rax, %xmm0
    0x7fffefc031f9 <+457>: movups %xmm0, (%r13)
    0x7fffefc031fe <+462>: addq   $0x18, %rsp
    0x7fffefc03202 <+466>: popq   %rbx
(lldb) q
Quitting LLDB will kill one or more processes. Do you really want to proceed: [Y/n] Y
root@53bb057b6d46:/# lscpu
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):                  2
  On-line CPU(s) list:   0,1
Vendor ID:               AuthenticAMD
  Model name:            AMD Turion(tm) II Neo N54L Dual-Core Processor
    CPU family:          16
    Model:               6
    Thread(s) per core:  1
    Core(s) per socket:  2
    Socket(s):           1
    Stepping:            3
    CPU(s) scaling MHz:  68%
    CPU max MHz:         2200.0000
    CPU min MHz:         800.0000
    BogoMIPS:            4392.68
    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 3dnowext 3dnow constant_tsc rep_good nopl nonstop_tsc cpuid extd_apicid pni monitor cx16 popcnt lahf_lm cmp_legacy svm exta
                         pic cr8_legacy abm sse4a misalignsse 3dnowprefetch osvw ibs skinit wdt nodeid_msr hw_pstate vmmcall npt lbrv svm_lock nrip_save
Virtualization features: 
  Virtualization:        AMD-V
Caches (sum of all):     
  L1d:                   128 KiB (2 instances)
  L1i:                   128 KiB (2 instances)
  L2:                    2 MiB (2 instances)
NUMA:                    
  NUMA node(s):          1
  NUMA node0 CPU(s):     0,1
Vulnerabilities:         
  Gather data sampling:  Not affected
  Itlb multihit:         Not affected
  L1tf:                  Not affected
  Mds:                   Not affected
  Meltdown:              Not affected
  Mmio stale data:       Not affected
  Retbleed:              Not affected
  Spec rstack overflow:  Not affected
  Spec store bypass:     Not affected
  Spectre v1:            Mitigation; usercopy/swapgs barriers and __user pointer sanitization
  Spectre v2:            Mitigation; Retpolines, STIBP disabled, RSB filling, PBRSB-eIBRS Not affected
  Srbds:                 Not affected
  Tsx async abort:       Not affected
root@53bb057b6d46:/#

Have you any idea if my processor is able to run pytorch in release 2.1.x, currently it run perfectly with release 2.0.1.

Thanks a lot and Happy new year

Versions

PyTorch 2.1.2
Python 3.11.4

cc @ezyang @gchanan @zou3519 @kadeng @seemethere @malfet @osalpekar @atalman @jgong5 @mingfeima @XiaobingSuper @sanchitintel @ashokei @jingxu10 @gujinghui @PenghuiCheng @jianyuh @min-jean-cho @yanbing-j @Guobing-Chen @Xia-Weiwen

Metadata

Metadata

Assignees

No one assigned

    Labels

    high prioritymodule: binariesAnything related to official binaries that we release to usersmodule: cpuCPU specific problem (e.g., perf, algorithm)module: mkldnnRelated to Intel IDEEP or oneDNN (a.k.a. mkldnn) integrationmodule: regressionIt used to work, and now it doesn'ttriagedThis issue has been looked at a team member, and triaged and prioritized into an appropriate module

    Type

    No type

    Projects

    No projects

    Milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions

      0