2025-04-01 1:57 AM
I follow the instructions found in https://github.com/STMicroelectronics/stm32ai-modelzoo-services/blob/main/image_classification/deployment/README.md in order to deploy an image classification model in STM32N6570-DK board.
When i launch (in ubuntu)
python stm32ai_main.py --config-path ./config_file_examples/ --config-name deployment_n6_mobilenet_v2_config.yaml
i get the following error
[WARNING] The usable GPU memory is unlimited.
Please consider setting the 'gpu_memory_limit' attribute in the 'general' section of your configuration file.
[INFO] : Running `deployment` operation mode
[INFO] : ClearML config check
[INFO] : The random seed for this simulation is 123
INFO: Created TensorFlow Lite XNNPACK delegate for CPU.
[INFO] : Generating C header file for Getting Started...
loading model.. model_path="../../../stm32ai-modelzoo/image_classification/mobilenetv2/ST_pretrainedmodel_public_dataset/flowers/mobilenet_v2_0.35_128_fft/mobilenet_v2_0.35_128_fft_int8.tflite"
loading conf file.. "../../application_code/image_classification/STM32N6/stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
[INFO] : Selected board : "STM32N6570-DK Getting Started Image Classification (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
[INFO] : Compiling the model and generating optimized C code + Lib/Inc files: ../../../stm32ai-modelzoo/image_classification/mobilenetv2/ST_pretrainedmodel_public_dataset/flowers/mobilenet_v2_0.35_128_fft/mobilenet_v2_0.35_128_fft_int8.tflite
setting STM.AI tools.. root_dir="", req_version=""
Cube AI Path: "/opt/st/STEdgeAI/2.0/Utilities/linux/stedgeai".
[INFO] : Offline CubeAI used; Selected tools: 10.0.0 (x-cube-ai pack)
loading conf file.. "../../application_code/image_classification/STM32N6/stmaic_STM32N6570-DK.conf" config="None"
"n6 release" configuration is used
compiling... "mobilenet_v2_0_35_128_fft_int8_tflite" session
model_path : ['../../../stm32ai-modelzoo/image_classification/mobilenetv2/ST_pretrainedmodel_public_dataset/flowers/mobilenet_v2_0.35_128_fft/mobilenet_v2_0.35_128_fft_int8.tflite']
tools : 10.0.0 (x-cube-ai pack)
target : "STM32N6570-DK Getting Started Image Classification (STM32CubeIDE)" (stm32_cube_ide/n6 release/stm32n6)
options : --st-neural-art default@../../application_code/image_classification/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast --output-data-type float32
[returned code = 255 - FAILED]
$ cwd: None
$ args: /opt/st/STEdgeAI/2.0/Utilities/linux/stedgeai generate --target stm32n6 -m ../../../stm32ai-modelzoo/image_classification/mobilenetv2/ST_pretrainedmodel_public_dataset/flowers/mobilenet_v2_0.35_128_fft/mobilenet_v2_0.35_128_fft_int8.tflite --output /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46 --workspace /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46 --st-neural-art default@../../application_code/image_classification/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast --output-data-type float32
ST Edge AI Core v2.0.0-20049
PASS: 0%| | 0/82 [00:00<?, ?it/s]
PASS: 9%|▊ | 7/82 [00:00<00:01, 39.76it/s]
PASS: 13%|█▎ | 11/82 [00:00<00:02, 34.83it/s]
PASS: 24%|██▍ | 20/82 [00:00<00:01, 54.28it/s]
PASS: 32%|███▏ | 26/82 [00:00<00:01, 47.81it/s]
PASS: 39%|███▉ | 32/82 [00:00<00:01, 44.83it/s]
PASS: 45%|████▌ | 37/82 [00:00<00:01, 43.41it/s]
PASS: 51%|█████ | 42/82 [00:00<00:00, 44.66it/s]
PASS: 57%|█████▋ | 47/82 [00:01<00:00, 46.05it/s]
PASS: 65%|██████▍ | 53/82 [00:01<00:00, 46.39it/s]
PASS: 71%|███████ | 58/82 [00:01<00:00, 43.25it/s]
PASS: 77%|███████▋ | 63/82 [00:01<00:00, 39.67it/s]
PASS: 83%|████████▎ | 68/82 [00:01<00:00, 41.47it/s]
PASS: 89%|████████▉ | 73/82 [00:01<00:00, 40.27it/s]
>>>> EXECUTING NEURAL ART COMPILER
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
/opt/st/STEdgeAI/2.0/Utilities/linux/atonn -i "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0.onnx" --json-quant-file "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_Q.json" -g "network.c" --load-mdesc "/opt/st/STEdgeAI/2.0/Utilities/configs/stm32n6.mdesc" --load-mpool "/home/test/Work/ST/stm32ai-modelzoo-services/application_code/image_classification/STM32N6/Model/my_mpools/stm32n6-app2.mpool" --save-mpool-file "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool" --out-dir-prefix "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/" --all-buffers-info --no-hw-sw-parallelism --cache-maintenance --enable-virtual-mem-pools --native-float --optimization 3 --Os --Omax-ca-pipe 4 --Ocache-opt --enable-epoch-controller --output-info-file "c_info.json"
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
>>> Shell execution has FAILED (returned code = 1)
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
$ /opt/st/STEdgeAI/2.0/Utilities/linux/atonn -i /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0.onnx --json-quant-file /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_Q.json -g network.c --load-mdesc /opt/st/STEdgeAI/2.0/Utilities/configs/stm32n6.mdesc --load-mpool /home/test/Work/ST/stm32ai-modelzoo-services/application_code/image_classification/STM32N6/Model/my_mpools/stm32n6-app2.mpool --save-mpool-file /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool --out-dir-prefix /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/ --all-buffers-info --no-hw-sw-parallelism --cache-maintenance --enable-virtual-mem-pools --native-float --optimization 3 --Os --Omax-ca-pipe 4 --Ocache-opt --enable-epoch-controller --output-info-file c_info.json
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
Error: machine description JSON ERROR:
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
INVALID_ARGUMENT:Unexpected end of string. Expected a value.
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
^
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
Warning: Machine description File: Machine '' does not have a version field
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
saving memory pool description "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool"
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
ERROR no fwd progress threshold exceeded (you might want to check the machine description)
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
Error: Internal scheduler error
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
<<<
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
E103(CliRuntimeError): Error calling the Neural Art compiler - ['', '', 'Error: machine description JSON ERROR:', 'INVALID_ARGUMENT:Unexpected end of string. Expected a value.', '', '^', '', "Warning: Machine description File: Machine '' does not have a version field", 'saving memory pool description "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool"', 'ERROR no fwd progress threshold exceeded (you might want to check the machine description)', '', 'Error: Internal scheduler error', '']
$ cwd: None
$ args: /opt/st/STEdgeAI/2.0/Utilities/linux/stedgeai generate --target stm32n6 -m ../../../stm32ai-modelzoo/image_classification/mobilenetv2/ST_pretrainedmodel_public_dataset/flowers/mobilenet_v2_0.35_128_fft/mobilenet_v2_0.35_128_fft_int8.tflite --output /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46 --workspace /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46 --st-neural-art default@../../application_code/image_classification/STM32N6/Model/user_neuralart.json --input-data-type uint8 --inputs-ch-position chlast --output-data-type float32
ST Edge AI Core v2.0.0-20049
PASS: 0%| | 0/82 [00:00<?, ?it/s]
PASS: 9%|▊ | 7/82 [00:00<00:01, 39.76it/s]
PASS: 13%|█▎ | 11/82 [00:00<00:02, 34.83it/s]
PASS: 24%|██▍ | 20/82 [00:00<00:01, 54.28it/s]
PASS: 32%|███▏ | 26/82 [00:00<00:01, 47.81it/s]
PASS: 39%|███▉ | 32/82 [00:00<00:01, 44.83it/s]
PASS: 45%|████▌ | 37/82 [00:00<00:01, 43.41it/s]
PASS: 51%|█████ | 42/82 [00:00<00:00, 44.66it/s]
PASS: 57%|█████▋ | 47/82 [00:01<00:00, 46.05it/s]
PASS: 65%|██████▍ | 53/82 [00:01<00:00, 46.39it/s]
PASS: 71%|███████ | 58/82 [00:01<00:00, 43.25it/s]
PASS: 77%|███████▋ | 63/82 [00:01<00:00, 39.67it/s]
PASS: 83%|████████▎ | 68/82 [00:01<00:00, 41.47it/s]
PASS: 89%|████████▉ | 73/82 [00:01<00:00, 40.27it/s]
>>>> EXECUTING NEURAL ART COMPILER
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
/opt/st/STEdgeAI/2.0/Utilities/linux/atonn -i "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0.onnx" --json-quant-file "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_Q.json" -g "network.c" --load-mdesc "/opt/st/STEdgeAI/2.0/Utilities/configs/stm32n6.mdesc" --load-mpool "/home/test/Work/ST/stm32ai-modelzoo-services/application_code/image_classification/STM32N6/Model/my_mpools/stm32n6-app2.mpool" --save-mpool-file "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool" --out-dir-prefix "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/" --all-buffers-info --no-hw-sw-parallelism --cache-maintenance --enable-virtual-mem-pools --native-float --optimization 3 --Os --Omax-ca-pipe 4 --Ocache-opt --enable-epoch-controller --output-info-file "c_info.json"
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
>>> Shell execution has FAILED (returned code = 1)
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
$ /opt/st/STEdgeAI/2.0/Utilities/linux/atonn -i /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0.onnx --json-quant-file /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_Q.json -g network.c --load-mdesc /opt/st/STEdgeAI/2.0/Utilities/configs/stm32n6.mdesc --load-mpool /home/test/Work/ST/stm32ai-modelzoo-services/application_code/image_classification/STM32N6/Model/my_mpools/stm32n6-app2.mpool --save-mpool-file /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool --out-dir-prefix /home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/ --all-buffers-info --no-hw-sw-parallelism --cache-maintenance --enable-virtual-mem-pools --native-float --optimization 3 --Os --Omax-ca-pipe 4 --Ocache-opt --enable-epoch-controller --output-info-file c_info.json
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
Error: machine description JSON ERROR:
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
INVALID_ARGUMENT:Unexpected end of string. Expected a value.
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
^
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
Warning: Machine description File: Machine '' does not have a version field
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
saving memory pool description "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool"
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
ERROR no fwd progress threshold exceeded (you might want to check the machine description)
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
Error: Internal scheduler error
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
<<<
PASS: 89%|████████▉ | 73/82 [00:02<00:00, 40.27it/s]
E103(CliRuntimeError): Error calling the Neural Art compiler - ['', '', 'Error: machine description JSON ERROR:', 'INVALID_ARGUMENT:Unexpected end of string. Expected a value.', '', '^', '', "Warning: Machine description File: Machine '' does not have a version field", 'saving memory pool description "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/experiments_outputs/2025_04_01_11_43_46/neural_art__network/stm32n6-app2.mpool"', 'ERROR no fwd progress threshold exceeded (you might want to check the machine description)', '', 'Error: Internal scheduler error', '']
Error executing job with overrides: []
Traceback (most recent call last):
File "/home/test/anaconda3/envs/st_zoo/lib/python3.10/site-packages/clearml/binding/hydra_bind.py", line 230, in _patched_task_function
return task_function(a_config, *a_args, **a_kwargs)
File "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/stm32ai_main.py", line 407, in main
process_mode(mode=mode, configs=cfg, train_ds=train_ds, valid_ds=valid_ds, quantization_ds=quantization_ds,
File "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/stm32ai_main.py", line 302, in process_mode
deploy(cfg=configs)
File "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/../deployment/deploy.py", line 90, in deploy
stm32ai_deploy_stm32n6(target=board, stlink_serial_number=stlink_serial_number, stm32ai_version=stm32ai_version, c_project_path=c_project_path,
File "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/../../common/deployment/common_deploy.py", line 469, in stm32ai_deploy_stm32n6
stmaic_local_call(session)
File "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/../../common/deployment/common_deploy.py", line 443, in stmaic_local_call
stmaic.compile(session=session, options=opt, target=session._board_config)
File "/home/test/Work/ST/stm32ai-modelzoo-services/image_classification/src/../../common/stm32ai_local/compile.py", line 208, in cmd_compile
raise Exception('Error during compilation')
Exception: Error during compilation
Can anyone help?
Solved! Go to Solution.
2025-04-02 7:04 AM
Hello @diama13 ,
I replicated your situation on a new install on linux.
The first time I ran the stm32ai_main.py I get the error: Exception: Error during compilation
To fix it, I use chmod:
sudo chmod 777 -R /opt/ST/STEdgeAI/
sudo chmod 777 -R /opt/ST/STEdgeAI/*
When I launch it again, I don't get the error anymore, but the script blocks and never end.
To solve that, I ran manually a generate with the command:
./stedgeai generate --model MY_MODEL --target stm32n6 --st-neural-art
And at the end of it, when running the ST Edge AI Core the first time, it asks:
Do you allow statistics to improve the command line ? (y)es / (n)
And wait util it gets an answer => which is why the model zoo do not finish.
After saying yes or no, the message never appears again.
So now, when I use the model zoo stm32ai_main.py, it works.
In your case, you did use the ST Edge AI Core manually, So I think that you don't have an issue anymore.
Please let me know.
Have a good day,
Julian
2025-04-01 2:03 AM
Hello @diama13,
Can you send me your file: deployment_n6_mobilenet_v2_config.yaml to make sure everything is setup correctly.
Have a good day,
Julian
2025-04-01 2:11 AM
Hi Julian,
I sent you the file by email. Also i copy/paste here the file "deployment_n6_mobilenet_v2_config.yaml":
general:
# path to a `.tflite` or `.onnx` file.
model_path: ../../../stm32ai-modelzoo/image_classification/mobilenetv2/ST_pretrainedmodel_public_dataset/flowers/mobilenet_v2_0.35_128_fft/mobilenet_v2_0.35_128_fft_int8.tflite
operation_mode: deployment
dataset:
name: flowers_dataset
class_names: [daisy, dandelion, roses, sunflowers, tulips]
preprocessing:
resizing:
interpolation: bilinear
aspect_ratio: crop
color_mode: rgb # rgb, bgr
tools:
stedgeai:
version: 10.0.0
optimization: balanced
on_cloud: False # Not Available For STM32N6
# path_to_stedgeai: C:/Users/<XXXXX>/STM32Cube/Repository/Packs/STMicroelectronics/X-CUBE-AI/<*.*.*>/Utilities/windows/stedgeai.exe
# path_to_cubeIDE: C:/ST/STM32CubeIDE_<*.*.*>/STM32CubeIDE/stm32cubeide.exe
path_to_stedgeai: /opt/st/STEdgeAI/2.0/Utilities/linux/stedgeai
path_to_cubeIDE: /opt/st/stm32cubeide_1.18.0/stm32cubeide
deployment:
c_project_path: ../../application_code/image_classification/STM32N6/
IDE: GCC
verbosity: 1
hardware_setup:
serie: STM32N6
board: STM32N6570-DK
hydra:
run:
dir: ./experiments_outputs/${now:%Y_%m_%d_%H_%M_%S}
mlflow:
uri: ./experiments_outputs/mlruns
2025-04-01 2:59 AM
I did another test also.
I copied the model in /opt/st/STEdgeAI/2.0/Utilities/linux folder and run the command:
./stedgeai generate --model mobilenet_v2_0.35_128_fft_int8_OE_3_1_0.onnx --target stm32n6 --st-neural-art
The output is:
ST Edge AI Core v2.0.0-20049
WARNING: Pad_11_out_0 is not quantized
WARNING: Pad_23_out_0 is not quantized
WARNING: Pad_35_out_0 is not quantized
WARNING: Pad_50_out_0 is not quantized
WARNING: Pad_62_out_0 is not quantized
WARNING: Pad_77_out_0 is not quantized
WARNING: Pad_92_out_0 is not quantized
WARNING: Pad_104_out_0 is not quantized
WARNING: Pad_119_out_0 is not quantized
WARNING: Pad_134_out_0 is not quantized
WARNING: Pad_149_out_0 is not quantized
WARNING: Pad_161_out_0 is not quantized
WARNING: Pad_176_out_0 is not quantized
WARNING: Pad_191_out_0 is not quantized
WARNING: Pad_203_out_0 is not quantized
WARNING: Pad_218_out_0 is not quantized
WARNING: Pad_233_out_0 is not quantized
WARNING: AveragePool_245_out_0 is not quantized
WARNING: Reshape_246_out_0 is not quantized
>>>> EXECUTING NEURAL ART COMPILER
/opt/st/STEdgeAI/2.0/Utilities/linux/atonn -i "/opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_output/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_OE_3_1_0.onnx" --json-quant-file "/opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_output/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_OE_3_1_0_Q.json" -g "network.c" --load-mdesc "/opt/st/STEdgeAI/2.0/Utilities/configs/stm32n6.mdesc" --load-mpool "/opt/st/STEdgeAI/2.0/Utilities/linux/targets/stm32/resources/mpools/stm32n6.mpool" --save-mpool-file "/opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_ws/neural_art__network/stm32n6.mpool" --out-dir-prefix "/opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_ws/neural_art__network/" --native-float --mvei --cache-maintenance --Ocache-opt --enable-virtual-mem-pools --Os --output-info-file "c_info.json"
>>> Shell execution has FAILED (returned code = 255)
$ /opt/st/STEdgeAI/2.0/Utilities/linux/atonn -i /opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_output/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_OE_3_1_0.onnx --json-quant-file /opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_output/mobilenet_v2_0.35_128_fft_int8_OE_3_1_0_OE_3_1_0_Q.json -g network.c --load-mdesc /opt/st/STEdgeAI/2.0/Utilities/configs/stm32n6.mdesc --load-mpool /opt/st/STEdgeAI/2.0/Utilities/linux/targets/stm32/resources/mpools/stm32n6.mpool --save-mpool-file /opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_ws/neural_art__network/stm32n6.mpool --out-dir-prefix /opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_ws/neural_art__network/ --native-float --mvei --cache-maintenance --Ocache-opt --enable-virtual-mem-pools --Os --output-info-file c_info.json
atonn: /home/atonci/ci/atonci/workspace/release_STAI_20/onnx_backend/include/CFG_Tensor.hpp:1041: uint64_t CFG_Tensor_Fanout::byteSize(bool): Assertion `_t->byteSize() == _h->byteSize()' failed.
saving memory pool description "/opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_ws/neural_art__network/stm32n6.mpool"
Internal compiler error (signo=6), please report it
<<<
E103(CliRuntimeError): Error calling the Neural Art compiler - ['', "atonn: /home/atonci/ci/atonci/workspace/release_STAI_20/onnx_backend/include/CFG_Tensor.hpp:1041: uint64_t CFG_Tensor_Fanout::byteSize(bool): Assertion `_t->byteSize() == _h->byteSize()' failed.", 'saving memory pool description "/opt/st/STEdgeAI/2.0/Utilities/linux/st_ai_ws/neural_art__network/stm32n6.mpool"', '', ' Internal compiler error (signo=6), please report it']
Could you please give any help?
2025-04-01 8:26 AM - edited 2025-04-01 8:26 AM
Hello @diama13 ,
Can you run the command with the tflite model directly please:
./stedgeai generate --model mobilenet_v2_0.35_128_fft_int8.tflite --target stm32n6 --st-neural-art
When installing the ST Edge AI core, do you remember if you also install the NPU addon?
To do so, you need to download an additional zip and select it during the installation of the ST Edge AI Core, do you remind doing it?
The zip is the last thing that you can download on the ST Edge AI Core page:
Have a good day,
Julian
2025-04-01 11:09 PM
Hi Julian,
In fact, I downloaded the en.stedgeai-stneuralart-10.0.0.zip and installed it during the installation of ST Edge AI Core.
Thanks.
2025-04-02 2:10 AM
Hi Julian,
I ran as superuser the command :
./stedgeai generate --model mobilenet_v2_0.35_128_fft_int8.tflite --target stm32n6 --st-neural-art
as you said and i attach the network_generate_report.txt which seems to be normal. Also, i attach the output of the terminal (terminal_output.txt) which says that "Shell execution has FAILED (returned code = 1) .... etc."
Can you explain me please why i have problems using the deployment_n6_mobilenet_v2_config.yaml which i also attch (i added the .txt extension ir order to upload it)?
Also, what about the error in terminal_output.txt ?
Thanks in advance.
2025-04-02 7:04 AM
Hello @diama13 ,
I replicated your situation on a new install on linux.
The first time I ran the stm32ai_main.py I get the error: Exception: Error during compilation
To fix it, I use chmod:
sudo chmod 777 -R /opt/ST/STEdgeAI/
sudo chmod 777 -R /opt/ST/STEdgeAI/*
When I launch it again, I don't get the error anymore, but the script blocks and never end.
To solve that, I ran manually a generate with the command:
./stedgeai generate --model MY_MODEL --target stm32n6 --st-neural-art
And at the end of it, when running the ST Edge AI Core the first time, it asks:
Do you allow statistics to improve the command line ? (y)es / (n)
And wait util it gets an answer => which is why the model zoo do not finish.
After saying yes or no, the message never appears again.
So now, when I use the model zoo stm32ai_main.py, it works.
In your case, you did use the ST Edge AI Core manually, So I think that you don't have an issue anymore.
Please let me know.
Have a good day,
Julian
2025-04-02 7:11 AM
Hi Julian,
indeed the problem was the rights of the STEdgeAI. I managed to run the .yaml file as well.
Thanks a lot
Have a good day.