Tachyon (QCM6490) Linux: DSP device nodes exist but libcdsprpc.so missing – how to enable QNN DSP/GPU backend?

Hello, I am using Particle Tachyon (Qualcomm QCM6490) running Ubuntu Linux. Findings: /dev/fastrpc-adsp and /dev/fastrpc-cdsp exist QNN libraries such as libQnnDsp.so, libQnnGpu.so are present But libcdsprpc.so is missing qnn-platform-validator fails for DSP backend clinfo shows only POCL CPU, no Adreno GPU OpenCL device Questions: Does Tachyon officially support DSP inference via QNN on Linux? Is there a userspace package that provides libcdsprpc.so and Hexagon RPC? Is Adreno OpenCL supported on Tachyon Ubuntu image? If yes, where can I obtain the proper OpenCL ICD and GPU drivers? Goal: enable hardware acceleration for real-time vision inference.

Ubuntu version: 24.04

The approach that’s been working is using the community edition of the Qualcomm AI Runtime: Qualcomm® Software Center.

You can get to a working qnn-platform-validator with the following:

Download the community edition of the runtime linked above, then set up some environment variables to tell the tool where to find the libraries:

wget https://softwarecenter.qualcomm.com/api/download/software/sdks/Qualcomm_AI_Runtime_Community/All/2.43.0.260128/v2.43.0.260128.zip
unzip v2.43.0.260128.zip 
pushd qairt && ln -s 2.43.0.260128 2.x && popd
export QNN_SDK=$(pwd)/qairt/2.x
export QNN_LIB=$QNN_SDK/lib/aarch64-ubuntu-gcc9.4
export LD_LIBRARY_PATH=$QNN_LIB
export ADSP_LIBRARY_PATH=$QNN_SDK/lib/hexagon-v68/unsigned
export PATH=$PATH:$QNN_SDK/bin/aarch64-ubuntu-gcc9.4
qnn-platform-validator --backend dsp --coreVersion --testBackend

This should output:

# DEBUG LOGS ...
Backend DSP Prerequisites: Present.
Unit Test on the backend DSP: Passed.
QNN is supported for backend DSP on the device.
*********** Results Summary ***********
Backend = DSP
{
  Backend Hardware  : Supported
  Backend Libraries : Found
  Library Version   : Not Queried
  Core Version      : Hexagon Architecture V68
  Unit Test         : Passed
}
2 Likes

Thanks @ericpietrowicz, this works on Ubuntu 20.04.

Nevertheless, I also have the same problem with Ubuntu 24.04 as the following libs are missing:

  • libcdsprpc.so
  • libcdsp_default_listener.so
  • libion.so.0
  • liblog.so.0

I’m also trying to figure out what is the right solution but I guess (just a guess yet) we need to build this: GitHub - qualcomm/fastrpc: FastRPC is Qualcomm's userspace library that facilitates efficient remote procedure calls between the CPU and DSP for high-performance computing.

I’ll update if I found a solution.

1 Like

These are the steps to build and install the missing FastRPC libs:

sudo apt update
sudo apt install -y \
          git \
          autoconf \
          automake \
          libtool \
          pkg-config \
          libyaml-dev \
          libbsd-dev \
          build-essential \
          make

cd /tmp
git clone https://github.com/quic/fastrpc
cd fastrpc
./gitcompile
sudo make install
rm -rf /tmp/fastrpc

Small change in @ericpietrowicz’s code regarding the LD_LIBRARY_PATH

export LD_LIBRARY_PATH=$QNN_LIB:/usr/local/lib

…and now it recognizes but it has some compatibility issues:

$ qnn-platform-validator --backend dsp --coreVersion --testBackend
PF_VALIDATOR: DEBUG: Calling PlatformValidator->setBackend
PF_VALIDATOR: DEBUG: Calling PlatformValidator->isBackendHardwarePresent
PF_VALIDATOR: DEBUG: Calling PlatformValidator->isBackendAvailable
PF_VALIDATOR: DEBUG: Should be able to access atleast one of libraries from : libc.so.6
PF_VALIDATOR: DEBUG: dlOpen successfull for library : libc.so.6
PF_VALIDATOR: DEBUG: Should be able to access atleast one of libraries from : libcdsprpc.so
PF_VALIDATOR: DEBUG: dlOpen successfull for library : libcdsprpc.so
Backend DSP Prerequisites: Present.
PF_VALIDATOR: DEBUG: Calling PlatformValidator->getCoreVersion
Core Version of the backend DSP: Hexagon Architecture V68
PF_VALIDATOR: DEBUG: Calling PlatformValidator->backendCheck
PF_VALIDATOR: DEBUG: Should be able to access atleast one of libraries from : libc.so.6
PF_VALIDATOR: DEBUG: dlOpen successfull for library : libc.so.6
PF_VALIDATOR: DEBUG: Should be able to access atleast one of libraries from : libcdsprpc.so
PF_VALIDATOR: DEBUG: dlOpen successfull for library : libcdsprpc.so
PF_VALIDATOR: DEBUG: Starting calculator test
PF_VALIDATOR: DEBUG: Loading sample stub: libQnnHtpV68CalculatorStub.so
PF_VALIDATOR: DEBUG: Successfully loaded DSP library - 'libQnnHtpV68CalculatorStub.so'.  Setting up pointers.
Unable to destroy the handlePF_VALIDATOR: ERROR: -6 . Error while executing the sum function.
PF_VALIDATOR: ERROR: Please use testsig if using unsigned images.
PF_VALIDATOR: ERROR: Also make sure ADSP_LIBRARY_PATH points to directory containing skels.
Unit Test on the backend DSP: Failed.
QNN is NOT supported for backend DSP on the device.
*********** Results Summary ***********
Backend = DSP
{
  Backend Hardware  : Supported
  Backend Libraries : Found
  Library Version   : Not Queried
  Core Version      : Hexagon Architecture V68
  Unit Test         : Failed
}

If I have some time then I will try again but I leave it here if it helps to someone.

2 Likes

Please let me know if you discover a fix.

It appears to me the hexagon*/unsigned/.Skel files are unsigned and the DSP stack does not allow running them. I’m currently stuck using @ericpietrowicz tutorial, and cross-referencing the qualcomm examples doc “tutorial_qtld_net_run.html” that comes in the examples folder with the qcom ai framework. I also used the edgeimpulse platform to train and generate a runner, which also failed in the same manner.* @szasza576 Thank you for the build commands for fastrpc, as that got me past initial dynamic loading errors. It sounds like 20.04 might allow the unsigned hexagon images to run, but 24.04 does not, based on previous posts.

FYI
{
"distro": {
"board": "formfactor_dvt",
"distribution": "ubuntu",
"distribution_version": "24.04",
"region": "NA",
"stack": "ubuntu-desktop-24.04",
"variant": "desktop",
"version": "1.1.43"
},
"src": {
"overlays": "HEAD",
"tachyon_composer": "1.1.43",
"u_boot": "1.0.30",
"ubuntu_20_04": "1.0.180",
"ubuntu_24_04": "22-938ac1d"
}
}

On Ubuntu 24.04.4 (Tachyon 1.1.43), qnn-platform-validator --backend dsp --testBackend fails with:

Please use testsig if using unsigned images.

I am using QAIRT 2.31.0.250130 and the skels from:
lib/hexagon-v68/unsigned/

There are no signed/testsig skels in the package.

Is Ubuntu 24.04 currently enforcing signed PD for DSP/HTP?
If so:

  • Is there a testsig-enabled configuration?

  • Or a signed skel bundle we should be using?

  • Or is HTP acceleration not currently supported on 24.04?