I'm having trouble installing pytorch

I’m having trouble installing pytorch for RaspberryPi 4 like this:

[1604/3322] Building C object confu-de…emm/gen/6x16c4-minmax-fp32-neondot.c.o
FAILED: confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c.o
/usr/bin/ccache /usr/bin/cc -DCPUINFO_SUPPORTED_PLATFORM=1 -DFXDIV_USE_INLINE_ASSEMBLY=0 -DXNN_ENABLE_ASSEMBLY=1 -DXNN_ENABLE_MEMOPT=1 -DXNN_ENABLE_SPARSE=1 -DXNN_LOG_LEVEL=0 -I…/third_party/XNNPACK/include -I…/third_party/XNNPACK/src -I…/third_party/cpuinfo/deps/clog/include -I…/third_party/cpuinfo/include -I…/third_party/pthreadpool/include -I…/third_party/FXdiv/include -I…/third_party/FP16/include -isystem …/third_party/protobuf/src -isystem …/third_party/gemmlowp -isystem …/third_party/neon2sse -O3 -DNDEBUG -fPIC -Wno-psabi -pthread -std=gnu99 -marm -march=armv8.2-a+dotprod -mfpu=neon-fp-armv8 -O2 -MD -MT confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c.o -MF confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c.o.d -o confu-deps/XNNPACK/CMakeFiles/XNNPACK.dir/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c.o -c …/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c: In function ‘xnn_qs8_gemm_minmax_fp32_ukernel_6x16c4__neondot’:
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:272:18: warning: implicit declaration of function ‘vcvtnq_s32_f32’; did you mean ‘vcvtq_s32_f32’? [-Wimplicit-function-declaration]
vacc0x0123 = vcvtnq_s32_f32(vproduct0x0123);
^~~~~~~~~~~~~~
vcvtq_s32_f32
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:272:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc0x0123 = vcvtnq_s32_f32(vproduct0x0123);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:273:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc0x4567 = vcvtnq_s32_f32(vproduct0x4567);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:274:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc0x89AB = vcvtnq_s32_f32(vproduct0x89AB);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:275:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc0xCDEF = vcvtnq_s32_f32(vproduct0xCDEF);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:276:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc1x0123 = vcvtnq_s32_f32(vproduct1x0123);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:277:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc1x4567 = vcvtnq_s32_f32(vproduct1x4567);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:278:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc1x89AB = vcvtnq_s32_f32(vproduct1x89AB);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:279:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc1xCDEF = vcvtnq_s32_f32(vproduct1xCDEF);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:280:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc2x0123 = vcvtnq_s32_f32(vproduct2x0123);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:281:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc2x4567 = vcvtnq_s32_f32(vproduct2x4567);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:282:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc2x89AB = vcvtnq_s32_f32(vproduct2x89AB);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:283:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc2xCDEF = vcvtnq_s32_f32(vproduct2xCDEF);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:284:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc3x0123 = vcvtnq_s32_f32(vproduct3x0123);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:285:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc3x4567 = vcvtnq_s32_f32(vproduct3x4567);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:286:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc3x89AB = vcvtnq_s32_f32(vproduct3x89AB);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:287:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc3xCDEF = vcvtnq_s32_f32(vproduct3xCDEF);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:288:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc4x0123 = vcvtnq_s32_f32(vproduct4x0123);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:289:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc4x4567 = vcvtnq_s32_f32(vproduct4x4567);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:290:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc4x89AB = vcvtnq_s32_f32(vproduct4x89AB);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:291:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc4xCDEF = vcvtnq_s32_f32(vproduct4xCDEF);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:292:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc5x0123 = vcvtnq_s32_f32(vproduct5x0123);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:293:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc5x4567 = vcvtnq_s32_f32(vproduct5x4567);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:294:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc5x89AB = vcvtnq_s32_f32(vproduct5x89AB);
^
…/third_party/XNNPACK/src/qs8-gemm/gen/6x16c4-minmax-fp32-neondot.c:295:16: error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’
vacc5xCDEF = vcvtnq_s32_f32(vproduct5xCDEF);
^
ninja: build stopped: subcommand failed.

what should i do?Thank you please help

Hi,

I’m having the same error. I did some research and on my side I think that it is related to the compiler I use vs having a 32 bit raspberry with armv7. There are some changes that could be done as changing the compiler, or add a line to a file in XNNPack (error: incompatible types when assigning to type ‘int32x4_t’ from type ‘int’ · Issue #1924 · google/XNNPACK · GitHub) but until now, none solved my error.

Did you had any solution?