Error in installing pytorch 1.1.0 with cuda 9.0 from source

[1208/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++11 -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/ccp0wFOC.s: Assembler messages:
/tmp/ccp0wFOC.s:53: Error: operand size mismatch for vbroadcastss' /tmp/ccp0wFOC.s:55: Error: operand size mismatch for vbroadcastss’
[1227/4410] Building CXX object third_p…avx2.dir/src/FbgemmI8DepthwiseAvx2.cc.
ninja: build stopped: subcommand failed.
Traceback (most recent call last):
File “setup.py”, line 737, in
build_deps()
File “setup.py”, line 316, in build_deps
cmake=cmake)
File “/home/liuxiyang/peige/DFDC/pytorch/tools/build_pytorch_libs.py”, line 62, in build_caffe2
cmake.build(my_env)
File “/home/liuxiyang/peige/DFDC/pytorch/tools/setup_helpers/cmake.py”, line 339, in build
self.run(build_args, my_env)
File “/home/liuxiyang/peige/DFDC/pytorch/tools/setup_helpers/cmake.py”, line 141, in run
check_call(command, cwd=self.build_dir, env=env)
File “/home/liuxiyang/anaconda3/envs/torch1_1/lib/python3.6/subprocess.py”, line 311, in check_call
raise CalledProcessError(retcode, cmd)
subprocess.CalledProcessError: Command ‘[‘cmake’, ‘–build’, ‘.’, ‘–target’, ‘install’, ‘–config’, ‘Release’, ‘–’, ‘-j’, ‘20’]’ returned non-zero exit status 1.

What should I do to solve this problem? Thank you.

g++ version is 5.3.1
cmake version is 3.14.0

Could you try to sync the submodules and rerun the installation?

git submodule sync && git submodule update --init --recursive

Hi, I met the same problem and have synced the submodules, but the problem still exists, are there any other solutions.

Could you try to uninstall all PyTorch installations, sync the submodules and rebuild?
Also, if that doesn’t help, create a new (conda) environment and try to build PyTorch there.

If that still doesn’t help, could you please post the stack trace here?

I updated my python to 3.7 and then used the following command to solve this problem.

git submodule sync && git submodule update --init --recursive

------------------ Original ------------------