FAILED: third_party/fbgemm/CMakeFiles/fbgemm_avx512.dir/src/FbgemmFloat16ConvertAvx512.cc.o

when I install the pytorch by source, I met the question as follows.

[1162/4410] Building CXX object third_p…dir/src/FbgemmFloat16ConvertAvx512.cc.
FAILED: third_party/fbgemm/CMakeFiles/fbgemm_avx512.dir/src/FbgemmFloat16ConvertAvx512.cc.o
/opt/rh/devtoolset-4/root/usr/bin/c++ -DFBGEMM_STATIC -DTH_BLAS_MKL -I…/third_party/cpuinfo/include -I…/third_party/fbgemm/third_party/asmjit/src -I…/third_party/fbgemm/include -I…/third_party/fbgemm -I…/cmake/…/third_party/benchmark/include -isystem …/cmake/…/third_party/googletest/googlemock/include -isystem …/cmake/…/third_party/googletest/googletest/include -isystem …/third_party/protobuf/src -isystem /home/liuxiyang/anaconda3/envs/torch1_1/include -isystem …/third_party/gemmlowp -isystem …/third_party/neon2sse -isystem …/third_party/XNNPACK/include -Wno-deprecated -fvisibility-inlines-hidden -fopenmp -O3 -DNDEBUG -fPIC -fvisibility=hidden -m64 -mavx2 -mfma -mavx512f -mavx512bw -mavx512dq -mavx512vl -masm=intel -std=c++14 -MD -MT third_party/fbgemm/CMakeFiles/fbgemm_avx512.dir/src/FbgemmFloat16ConvertAvx512.cc.o -MF third_party/fbgemm/CMakeFiles/fbgemm_avx512.dir/src/FbgemmFloat16ConvertAvx512.cc.o.d -o third_party/fbgemm/CMakeFiles/fbgemm_avx512.dir/src/FbgemmFloat16ConvertAvx512.cc.o -c …/third_party/fbgemm/src/FbgemmFloat16ConvertAvx512.cc
/tmp/cckA7tcH.s: Assembler messages:
/tmp/cckA7tcH.s:53: Error: operand size mismatch for vbroadcastss' /tmp/cckA7tcH.s:55: Error: operand size mismatch for vbroadcastss’

how can I fix it? Thank you.

the g++ version is 5.3.1
the cmake version is 3.14.0
the python version is the anaconda with py3.6

I also meet the same problem for same env with you(gcc 5.3, py3.6), there two options can solve this problem:

  1. USE_FBGEMM=0 python setup.py install in case of you don’t want to use low-precision solution.

  2. Using higher gcc version, gcc 6.3.1 can works in my side.