PyTorch 2.1.1 build error

Hello everyone, I encountered a build problem when compiling PyTorch, as follows:

/home/xx/project/pytorch-v2.1.1/caffe2/perfkernels/common_avx512.cc:18:2: error: #error ( "You found a build system error: AVX512F, AVX512DQ, AVX512VL " "is defined (via e.g. -mavx512f, -mavx512dq, and -mavx512vl) " “but CAFFE2_PERF_WITH_AVX512 is not defined.”);

command:
export CMAKE_PREFIX_PATH=${CONDA_PREFIX:-"$(dirname $(which conda))/../"}

export BLIS_HOME=/xx/xx/blis

export PATH=$BLIS_HOME/include/blis:$PATH LD_LIBRARY_PATH=$BLIS_HOME/lib:$LD_LIBRARY_PATH

export BLAS=BLIS

USE_DISTRIBUTED=0 USE_MKLDNN=0 USE_CUDA=0 USE_FBGEMM=0 USE_NNPACK=0 USE_QNNPACK=0 USE_XNNPACK=0 USE_FLASH_ATTENTION=0 BUILD_TEST=1 BUILD_CAFFE2=1 BUILD_CAFFE2_OPS=1 USE_OPENMP=1 python setup.py develop 2>&1 | tee m.txt

Caffe2 is deprecated and I don’t think its build is tested so disable it again of just remove BUILD_CAFFE2=1 to use the default (which won’t build with it).