-
Notifications
You must be signed in to change notification settings - Fork 51
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Occur an ASM error when compiling arm_nn_mat_mul_core_4x_s8 #87
Comments
Hi @WORsjlt |
Also would like to check if it may be related to compiler options? |
Hi @mansnils GGC heuristics: --param ggc-min-expand=100 --param ggc-min-heapsize=131072 Hope it helps! |
It looks like a supported compiler. Question is how to reproduce this. Do you build like described here: https://github.com/ARM-software/CMSIS-NN#building-cmsis-nn-as-a-library |
I tried to build cmsis-nn inside a project using Nuttx. I defined -DTARGET_CPU=cortex-m55 and some custom options, but I'm not sure which option produces this. Here are some options filtering out header files: |
@WORsjlt The optimization level is missing in this. Could you try with atleast -O1 or higher? |
@felix-johnny I used -O3. |
@WORsjlt Could you post the complete line from above (...arm_nn_mat_mul_core_4x_s8.c -quiet -dumpdir ...) with all compiler options? |
@mansnils Sure! Some of the project information has been removed for personal academic reasons. Sorry about that. COLLECT_GCC_OPTIONS='-c' '-Wstrict-prototypes' '-Wno-attributes' '-Wno-unknown-pragmas' '-Wno-psabi' '-nostdlib' '-pipe' '-O3' '-fno-strict-aliasing' '-fno-omit-frame-pointer' '-fno-optimize-sibling-calls' '-funwind-tables' '-fasynchronous-unwind-tables' '-fno-common' '-Wall' '-Wshadow' '-Wundef' '-ffunction-sections' '-fdata-sections' '-g' '-mlittle-endian' '-mtune=cortex-m55' '-mfpu=fpv5-d16' '-mfloat-abi=hard' '-mthumb' '-isystem' '-D' 'NuttX' '-Wno-cpp' '-v' '-o' 'cmsis-nn/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c.(my project path).cmsis-nn.o' '-mlibarch=armv8.1-m.main+fp.dp+mve.fp' '-march=armv8.1-m.main+fp.dp+mve.fp' '-dumpdir' 'cmsis-nn/Source/NNSupportFunctions/' /(my project path)/prebuilts/gcc/linux/arm/bin/../libexec/gcc/arm-none-eabi/11.3.1/cc1 -quiet -v thumb/v8-m.main+dp/hard -iprefix /(my project path)/prebuilts/gcc/linux/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/ -isysroot /(my project path)/prebuilts/gcc/linux/arm/bin/../arm-none-eabi -D__USES_INITFINI__ -D NuttX -isystem /(my project path)/nuttx/include cmsis-nn/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c -quiet -dumpdir cmsis-nn/Source/NNSupportFunctions/ -dumpbase arm_nn_mat_mul_core_4x_s8.c.(my project path).cmsis-nn.c -dumpbase-ext .c -mlittle-endian -mtune=cortex-m55 -mfpu=fpv5-d16 -mfloat-abi=hard -mthumb -mlibarch=armv8.1-m.main+fp.dp+mve.fp -march=armv8.1-m.main+fp.dp+mve.fp -g -O3 -Wstrict-prototypes -Wno-attributes -Wno-unknown-pragmas -Wno-psabi -Wall -Wshadow -Wundef -Wno-cpp -version -fno-strict-aliasing -fno-omit-frame-pointer -fno-optimize-sibling-calls -funwind-tables -fasynchronous-unwind-tables -fno-common -ffunction-sections -fdata-sections -o - | /(my project path)/prebuilts/gcc/linux/arm/bin/../lib/gcc/arm-none-eabi/11.3.1/../../../../arm-none-eabi/bin/as -v -EL -march=armv8.1-m.main+fp.dp+mve.fp -mfloat-abi=hard -mfpu=fpv5-d16 -meabi=5 -mthumb -mimplicit-it=always -o cmsis-nn/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c.(my project path).cmsis-nn.o |
Can you try without |
Cancelling |
Processor: Cortex-M55
Error message:
cmsis-nn/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c: In function 'arm_nn_mat_mul_core_4x_s8':
/(my project path)/cmsis-nn/Include/Internal/arm_nn_compiler.h:97:23: error: 'asm' operand has impossible constraints
97 | #define __ASM __asm
| ^~~~~
cmsis-nn/Source/NNSupportFunctions/arm_nn_mat_mul_core_4x_s8.c:84:9: note: in expansion of macro '__ASM'
84 | __ASM volatile(" .p2align 2 \n"
| ^~~~~
Why is this happening? And how to fix it?
Appreciate!
The text was updated successfully, but these errors were encountered: