[Issue] Segmentation fault during NeuronCompilation for Qwen2.5-0.5B on G720 SoC

Dear MTK Support / Developer Center,

I am encountering a Neuron-related Segmentation fault that causes my process to crash while configuring a GAI large model on a Genio 720 (G720) development board, following the official documentation. I would greatly appreciate any troubleshooting advice.

[Hardware & Environment]

  • SoC: MediaTek Genio 720 (G720)

  • Model: Qwen2.5-0.5B

[Steps to Reproduce]

  1. Pushed the environment variables and the compiled model to the board as instructed in the documentation.

  2. Disabled SELinux restrictions for NPU access (using setenforce 0 and configuring the corresponding policies).

  3. Executed ./main for testing, but the program crashed immediately. I also tried appending the -usdk parameter, but the exact same error persists.

[Error Logs]

1. Application Layer Logs:

Plaintext

ERROR: NeuronCompilation_finish fail [jni/prebuilt/src/executor/neuron_usdk_executor.cpp:179]
ERROR: load dla fail [jni/prebuilt/src/executor/neuron_usdk_executor.cpp:238]
Segmentation fault (core dumped)

2. SoC Runtime & Neuron Version Logs: Based on the system logs, there appears to be a version mismatch between the runtime (NP8) and the adapter being requested (NP9).

Library strings check (libneuron_runtime.so):

Plaintext

X316:/data # strings /vendor/lib64/libneuron_runtime.so | grep -iE 'version|build'
...
/mfs/mtkslt1072/mtk23027/citbuild_np8/2025_02_27/manifest/neuron/NDK_BUILD_TEST/ruy/ruy/kernel_common.h
...
Version: 8.2.19

Logcat AdapterLib check:

Plaintext

139|X316:/data/local/tmp/mtk_llm # logcat -d | grep -iE 'AdapterLib|neuronusdk'
07-11 02:28:53.506  3597  3597 I AdapterLib: Try to open library libneuronusdk_adapter.9.mtk.so
07-11 02:28:53.506  3597  3597 E AdapterLib: Unable to open library libneuronusdk_adapter.9.mtk.so : dlopen failed: library "libneuronusdk_adapter.9.mtk.so" not found
07-11 02:28:53.651  3597  3597 I AdapterLib: Try to open library libneuronusdk_adapter.mtk.so 

Could this Segmentation fault and DLA load failure be caused by the application attempting to load an NP9 USDK adapter (libneuronusdk_adapter.9.mtk.so) while the system’s underlying Neuron runtime is NP8 (Version: 8.2.19 / citbuild_np8)?

Thank you in advance for your help!

any solution?

Hi Gary,

Thanks for reaching out!
To help narrow down the root cause, could you share the following?

  • LLM SDK version: What version are you on?
  • cmdline_tool version: Which version did you use to compile the model?
  • Android image version: What Android image is currently on your G720 board?

Best,
Jun

Hi Jun,

Here are the versions you requested:

  • LLM SDK version: 20250423_Neuron_SDK_v1.2517.03_neuron-8.0-release.tar.gz

  • cmdline_tool version: llm_cmdline_tool-v1.8.0.zip

  • Android image version: UNISMART_AI1_U0MP5_AIOT8391P2_64_BSP

Regarding the issue, the root cause is related to the hardware target configurations in the compilation scripts and a file parsing error.

First, the backend architecture needs to be explicitly defined for our target chip. I manually modified the two LLM compilation scripts by replacing the configurations with the following parameters:

Bash

BACKEND="mdla5.3,edma3.6"
L1_SIZE_KB="256"
NUM_MDLA="1"

Additionally, an empty line (or trailing space) must be added at the very end of the .yawl file, otherwise it throws a segmentation fault.

With these changes, the compilation completes successfully using the Neuron_SDK_v1.2517.03_neuron-8.0-release.tar.gz package.

Best regards,

Gary