GreenWaves-Technologies / yolox_people_detection

3 stars 0 forks source link

Graph constructor exited with error: 1 #1

Open HeleMartin opened 1 year ago

HeleMartin commented 1 year ago

Hello,

I am trying to test the yolox people detection on gvsoc. I am using the gap_sdk_private with the 5.7.1 version and the last yolox people detection repository. I have launched the following commands :

rm -rf build weigths_tensors model.c modelInfos.h
cmake -B build -DMODE=INFERENCE
cd build
make clean all run platform=gvsoc

But I have the following issue :

     *** NNTOOL main_inference ***

Entering main controller
FC Frequency as 370000000 Hz, CL Frequency = 370000000 Hz, PERIIPH Frequency = 360000000 Hz
Constructor
Graph constructor exited with error: 1
(check the generated file mainKernels.c to see which memory have failed to be allocated)
make[3]: *** [CMakeFiles/run.dir/build.make:76 : CMakeFiles/run] Erreur 1
make[2]: *** [CMakeFiles/Makefile2:610 : CMakeFiles/run.dir/all] Erreur 2
make[1]: *** [CMakeFiles/Makefile2:617 : CMakeFiles/run.dir/rule] Erreur 2
make: *** [Makefile:235 : run] Erreur 2

What can I do to solve this issue ?

Best regards,

Yaooooo commented 1 year ago

Hi,

It works fine for me:

NNTOOL main_inference

Entering main controller FC Frequency as 370000000 Hz, CL Frequency = 370000000 Hz, PERIIPH Frequency = 360000000 Hz Constructor

READING INPUT FROM PPM FILE Image /home/yao/projects/sdk/sdk_integration/nn_menu/starters/yolox_people_detection/test_data/input.ppm: [W: 320, H: 240] Bytes per pixel 3, HeaderSize: 15 Image /home/yao/projects/sdk/sdk_integration/nn_menu/starters/yolox_people_detection/test_data/input.ppm, [W: 320, H: 240], Bytes per pixel 3, Size: 230400 bytes, Loaded successfully Start FC timer Start slicing Call CLUSTER Start CLUSTER timer Start decoding Start xywh2xyxy Start filter boxes Start conver boxes Start nms Image /home/yao/projects/sdk/sdk_integration/nn_menu/starters/yolox_people_detection/test_data/input.ppm: [W: 320, H: 240] Bytes per pixel 3, HeaderSize: 15 Image /home/yao/projects/sdk/sdk_integration/nn_menu/starters/yolox_people_detection/test_data/input.ppm, [W: 320, H: 240], Bytes per pixel 3, Size: 230400 bytes, Loaded successfully Start draw reactangles Start JPEG compression Start flushing compressed image Writing jpeg image to file: /home/yao/projects/sdk/sdk_integration/nn_menu/starters/yolox_people_detection/output_compressed.jpg Runner completed Start saving output

                                  Slicing: Cycles:       865337, Cyc%:

6.8%, Operations: 0, Op%: 0.0%, Operations/Cycle: 0.000000 NN: Cycles: 8403158, Cyc%: 65.7%, Operations: 236707560, Op%: 100.0%, Operations/Cycle: 28.168880 Decoding: Cycles: 33982, Cyc%: 0.3%, Operations: 0, Op%: 0.0%, Operations/Cycle: 0.000000 xywh2xyxy: Cycles: 20616, Cyc%: 0.2%, Operations: 0, Op%: 0.0%, Operations/Cycle: 0.000000 Filter boxes: Cycles: 18128, Cyc%: 0.1%, Operations: 0, Op%: 0.0%, Operations/Cycle: 0.000000 seq2bboxes: Cycles: 9285, Cyc%: 0.1%, Operations: 0, Op%: 0.0%, Operations/Cycle: 0.000000 NMS: Cycles: 42049, Cyc%: 0.3%, Operations: 0, Op%: 0.0%, Operations/Cycle: 0.000000 JPEG Compress: Cycles: 3391457, Cyc%: 26.5%, Operations: 0, Op%: 0.0%, Operations/Cycle: 0.000000

                          Total Inference: Cycles:     12784012, Cyc%:

100.0%, Operations: 236707560, Op%: 100.0%, Operations/Cycle: 18.515905

Ended [100%] Built target run

I believe the issue is you are not using cmake correctly, so there are some flags hasn't been brought to your build.

This is how it should be used:

cmake -B build -DMODE=INFERENCE

cmake --build build -t run

If you want to change the config, you can do:

cmake --build build -t menuconfig

Then you will have a GUI to configure your application build.

I will do a new release today, where you can have a full doc about how to use these in cmake.

Regards.

On Tue, Apr 18, 2023 at 10:22 AM HeleMartin @.***> wrote:

Hello,

I am trying to test the yolox people detection on gvsoc. I am using the gap_sdk_private with the 5.7.1 version and the last yolox people detection repository. I have launched the following commands :

rm -rf build weigths_tensors model.c modelInfos.h cmake -B build -DMODE=INFERENCE cd build make clean all run platform=gvsoc

But I have the following issue :

NNTOOL main_inference

Entering main controller FC Frequency as 370000000 Hz, CL Frequency = 370000000 Hz, PERIIPH Frequency = 360000000 Hz Constructor Graph constructor exited with error: 1 (check the generated file mainKernels.c to see which memory have failed to be allocated) make[3]: [CMakeFiles/run.dir/build.make:76 : CMakeFiles/run] Erreur 1 make[2]: [CMakeFiles/Makefile2:610 : CMakeFiles/run.dir/all] Erreur 2 make[1]: [CMakeFiles/Makefile2:617 : CMakeFiles/run.dir/rule] Erreur 2 make: [Makefile:235 : run] Erreur 2

What can I do to solve this issue ?

Best regards,

— Reply to this email directly, view it on GitHub https://github.com/GreenWaves-Technologies/yolox_people_detection/issues/1, or unsubscribe https://github.com/notifications/unsubscribe-auth/ABD6RW3NURDO4QXTDCBMUELXBZFMTANCNFSM6AAAAAAXCIUZ5Y . You are receiving this because you are subscribed to this thread.Message ID: @.***>

--

Yao ZHANGGlobal Customer Projects Director Tel: 06.82.78.41.71 Mail: @.*** Skype: zhyao930 Wechat: 453115693

[image: https://greenwaves-technologies.com/] https://greenwaves-technologies.com/

HeleMartin commented 1 year ago

Hey,

I have reinstalled cmake and try your commands but I have the same issue. I have also tried on the mnist example and I have the same issue also. When I use the command make clean all run platform=gvsoc, it works.

HeleMartin commented 1 year ago

Hello,

Here the sdk.config used in the mnist example where I have the same issue :

#
# NN MNIST test menu
#

#
# Options
#
CONFIG_MNIST_MODEL_SQ8=y
# CONFIG_MNIST_MODEL_FP16 is not set
# CONFIG_MNIST_MODEL_POW2 is not set
# end of NN MNIST test menu

#
# GAP_SDK
#

#
# Board
#
# CONFIG_BOARD_GAP9MOD_V1_0_B is not set
CONFIG_BOARD_GAP9_V2_VIRTUAL=y
# CONFIG_BOARD_GAP9AUDIO_V1 is not set

#
# Additionnal Boards
#
# end of Board

CONFIG_IS_VIRTUAL_BOARD=y
CONFIG_CHIP_GAP9_V2_WLCSP=y
CONFIG_CHIP_FAMILY_9=y
CONFIG_CHIP_VERSION_2=y
CONFIG_CHIP_FAMILY=9
CONFIG_CHIP_VERSION=2

#
# Platform
#
CONFIG_PLATFORM_GVSOC=y
# CONFIG_PLATFORM_RTL is not set
# CONFIG_PLATFORM_FPGA is not set

#
# GVSOC options
#
# CONFIG_GVSOC_W_NO_UNCONNECTED_DEVICE is not set
# end of GVSOC options
# end of Platform

#
# Drivers
#

#
# GAP9 v2
#

#
# UDMA
#
# CONFIG_DRIVER_UDMAOCTOSPI is not set
CONFIG_DRIVER_UDMAHYPERBUS=y
CONFIG_DRIVER_UDMAAES=y
# CONFIG_DRIVER_UDMAUART is not set
# CONFIG_DRIVER_UDMACPI is not set
# CONFIG_DRIVER_UDMACSI2 is not set
# CONFIG_DRIVER_UDMAFIFO is not set
# CONFIG_DRIVER_UDMATIMEOUT is not set
# CONFIG_DRIVER_UDMADATAMOVE is not set
# CONFIG_DRIVER_UDMATIMESTAMP is not set
# end of UDMA

#
# Cluster
#
# CONFIG_DRIVER_CLUSTERDECOMPRESSOR is not set
# CONFIG_DRIVER_CLUSTERTEAM is not set
# CONFIG_DRIVER_CLUSTERUART is not set
# CONFIG_DRIVER_CLUSTER_L1MALLOC is not set
# end of Cluster

# CONFIG_DRIVER_SPIM is not set
# CONFIG_DRIVER_I2C is not set
# CONFIG_DRIVER_I3C is not set
# CONFIG_DRIVER_I2S is not set
# CONFIG_DRIVER_L2MALLOC is not set
# CONFIG_DRIVER_MEMSLAB is not set
# CONFIG_DRIVER_FFC is not set
# CONFIG_DRIVER_RTC is not set
# CONFIG_DRIVER_DMACPY is not set
CONFIG_DRIVER_QUIDDIKEY=y
# CONFIG_DRIVER_PWM is not set
# CONFIG_DRIVER_XIP is not set
# CONFIG_DRIVER_EFUSE is not set
# end of GAP9 v2

#
# ADC
#
CONFIG_PI_LOG_LEVEL_NONE=y
# CONFIG_PI_LOG_LEVEL_ERROR is not set
# CONFIG_PI_LOG_LEVEL_WARNING is not set
# CONFIG_PI_LOG_LEVEL_INFO is not set
# CONFIG_PI_LOG_LEVEL_DEBUG is not set
# CONFIG_PI_LOG_LEVEL_TRACE is not set
CONFIG_PI_LOG_LEVEL="PI_LOG_NONE"
# end of ADC

# CONFIG_DRIVER_BOOTLOADER is not set

#
# Camera
#
# end of Camera

#
# CRC
#
# CONFIG_DRIVER_CRCMD5 is not set
CONFIG_DRIVER_CRC32=y
# end of CRC

CONFIG_HAS_FLASH_HARDWARE=y
CONFIG_HAS_HYPERFLASH_HARDWARE=y
CONFIG_DRIVER_HYPERFLASH_AS_DEFAULT=y
CONFIG_HAS_MRAM_HARDWARE=y
CONFIG_DRIVER_TYPE_FLASH=y

#
# Flash drivers
#
CONFIG_DRIVER_MRAM=y
CONFIG_DRIVER_HYPERFLASH=y
CONFIG_DRIVER_HYPERFLASH_BAUDRATE_DEFAULT=y
# CONFIG_DRIVER_HYPERFLASH_BAUDRATE_USER is not set
# end of Flash drivers

#
# FS
#
CONFIG_DRIVER_HOSTFS=y
CONFIG_DRIVER_READFS=y
# CONFIG_DRIVER_LITTLEFS is not set
# CONFIG_DRIVER_VFS is not set
CONFIG_READFS_FLASH_TYPE_DEFAULT=y
# CONFIG_READFS_FLASH_TYPE_HYPER is not set
# CONFIG_READFS_FLASH_TYPE_MRAM is not set
# CONFIG_READFS_FLASH_TYPE_QSPI is not set
# CONFIG_READFS_FLASH_TYPE_OSPI is not set
# end of FS

#
# Drivers
#
# end of Drivers

#
# Drivers
#
# end of Drivers

# CONFIG_DRIVER_OTA is not set

#
# Partitions
#
CONFIG_DRIVER_PARTITION=y
# CONFIG_DRIVER_PARTITION_APP_ELF is not set
# CONFIG_DRIVER_FLASH_PARTITION is not set
CONFIG_DRIVER_FLASH_PARTITION_V2=y

#
# Advanced
#
# CONFIG_DRIVER_FLASH_PARTITION_V2_DISABLE_AUTO_REGISTRY is not set
# end of Advanced
# end of Partitions

CONFIG_HAS_RAM_HARDWARE=y
CONFIG_HAS_HYPERRAM_HARDWARE=y
CONFIG_DRIVER_HYPERRAM_AS_DEFAULT=y
CONFIG_DRIVER_TYPE_RAM=y

#
# Ram drivers
#
CONFIG_DRIVER_HYPERRAM=y
CONFIG_DRIVER_HYPERRAM_BAUDRATE_DEFAULT=y
# CONFIG_DRIVER_HYPERRAM_BAUDRATE_USER is not set
# end of Ram drivers
# end of Drivers

#
# Core
#

#
# Clocks
#
CONFIG_FAST_OSC=y
# CONFIG_SLOW_OSC is not set
# CONFIG_USE_FAST_REF_CLK_PAD is not set
CONFIG_FAST_OSC_FREQUENCY=24576063
CONFIG_FLL_MAXDCO_FREQ=900000000
CONFIG_FREQUENCY_PERIPH=160000000
CONFIG_FREQUENCY_FC=50000000
CONFIG_FREQUENCY_CLUSTER=50000000
CONFIG_FREQUENCY_SFU=50000000
CONFIG_FREQUENCY_FPGA=50000000
# end of Clocks

#
# Stacks
#
CONFIG_FC_APP_MAIN_STACK_SIZE=2048
CONFIG_CL_MASTER_CORE_STACK_SIZE=4096
CONFIG_CL_SLAVE_CORE_STACK_SIZE=1024

#
# Advanced
#
CONFIG_EVENT_KERNEL_STACK_SIZE=256
# end of Advanced
# end of Stacks

#
# Memory allocator
#
# CONFIG_MALLOC_NO_FC_L1 is not set
# end of Memory allocator

CONFIG_LINKER_SCRIPT_DEFAULT=y
# CONFIG_LINKER_SCRIPT_XIP is not set
# CONFIG_LINKER_SCRIPT_UPPER_MEMORY is not set
CONFIG_FLASH_LAYOUT_DEFAULT=y
# CONFIG_FLASH_LAYOUT_CUSTOM is not set
CONFIG_BOOT_DEVICE_MRAM=y
# CONFIG_BOOT_DEVICE_HYPERFLASH is not set
# CONFIG_BOOT_DEVICE_OSPIFLASH is not set
# CONFIG_OPEN_LOOP_BOOT is not set
# CONFIG_XIP is not set
# CONFIG_SLEEP_WITH_RETENTION is not set
# end of Core

#
# OS
#
CONFIG_FREERTOS_TICK_RATE_HZ=100
# CONFIG_FREERTOS_USE_TIMERS is not set
CONFIG_FREERTOS_USE_PREEMPTION=y
# end of OS

#
# Libs
#
# CONFIG_LIB_FRAME_STREAMER is not set
# CONFIG_LIB_OPENMP is not set
# CONFIG_LIB_MBEDTLS is not set
CONFIG_LIB_GAP_LIB=y

#
# GAP LIB Configuration
#
# CONFIG_LIB_GAP_LIB_G722_ENC_DEC is not set
CONFIG_LIB_GAP_LIB_IMG_IO=y
# CONFIG_LIB_GAP_LIB_IMG_IO_EMUL is not set
# CONFIG_LIB_GAP_LIB_JPEG is not set
# CONFIG_LIB_GAP_LIB_TESTBENCH is not set
# CONFIG_LIB_GAP_LIB_WAV_IO is not set
# CONFIG_LIB_SINE_GENERATOR is not set
# end of GAP LIB Configuration

# CONFIG_LIB_SFU is not set
# CONFIG_LIB_SFU_LEGACY is not set

#
# SFU Options
#
# end of SFU Options
# end of Libs

#
# Tools
#

#
# Autotiler
#
CONFIG_ENABLE_AUTOTILER=y

#
# Kernel sets used
#
# CONFIG_CNN_POW2 is not set
CONFIG_CNN_SQ8=y
# CONFIG_CNN_FP16 is not set
# CONFIG_CNN_NE16 is not set
# end of Kernel sets used

CONFIG_MODEL_L1_MEMORY=128000
CONFIG_MODEL_L2_MEMORY=1300000
CONFIG_MODEL_L3_MEMORY=8000000
CONFIG_MODEL_BUILDDIR="BUILD_MODEL"
# CONFIG_MODEL_HAS_NO_CONSTANTS is not set
# CONFIG_MODEL_EMUL is not set
CONFIG_MODEL_FLASH_TYPE_DEFAULT=y
# CONFIG_MODEL_FLASH_TYPE_HYPER is not set
# CONFIG_MODEL_FLASH_TYPE_MRAM is not set
# CONFIG_MODEL_FLASH_TYPE_QSPI is not set
# CONFIG_MODEL_FLASH_TYPE_OSPI is not set
CONFIG_MODEL_RAM_TYPE_DEFAULT=y
# CONFIG_MODEL_RAM_TYPE_HYPER is not set
# CONFIG_MODEL_RAM_TYPE_QSPI is not set
# CONFIG_MODEL_RAM_TYPE_OSPI is not set
CONFIG_MODEL_LOGLEVEL=1
CONFIG_MODEL_FLOAT16_TYPE_BFLOAT16=y
# CONFIG_MODEL_FLOAT16_TYPE_IEEE16 is not set
CONFIG_MODEL_DSP_FLOAT16_TYPE_BFLOAT16=y
# CONFIG_MODEL_DSP_FLOAT16_TYPE_IEEE16 is not set
# CONFIG_MODEL_REENTRANT_MODE is not set
# end of Autotiler

#
# NNTool
#
CONFIG_ENABLE_NNTOOL=y
CONFIG_NNTOOL_SCRIPT_PATH="model/nntool_script"
CONFIG_NNTOOL_EXTRA_FLAGS=""
CONFIG_NNTOOL_MODEL_PATH="model/mnist.tflite"
CONFIG_NNTOOL_EXPRESSIONS_SRC=""
CONFIG_NNTOOL_COPY_MODEL_TO_BUILDDIR=y
# CONFIG_NNTOOL_MODEL_QUANTIZED is not set
CONFIG_NNTOOL_LOGLEVEL="warning"
# end of NNTool
# end of Tools

#
# Utils
#

#
# IO
#
CONFIG_IO_TYPE_SEMIHOSTING=y
# CONFIG_IO_TYPE_SIMULATION is not set
# CONFIG_IO_TYPE_UART is not set
# CONFIG_IO_TYPE_DISABLED is not set
# CONFIG_IO_PRINTF_FLOAT_ENABLE is not set
# end of IO

#
# Debug
#
# CONFIG_DEBUG_ASSERT is not set

#
# Log level
#
# end of Log level

# CONFIG_GDB_SERVER is not set
# end of Debug

#
# SECURITY
#
# CONFIG_ENABLE_OTA_SIGN is not set
# end of SECURITY

# CONFIG_ENABLE_GAP_CLI is not set
# end of Utils
# end of GAP_SDK

Do you see an error of configuration that could explain my issue ?