Access Adreno GPU inside a Docker container

213 Views Asked by At

I recently bought this edge computer: https://www.thundercomm.com/product/eb5-edge-ai-box/

I has an Adreno 650 GPU.

I'm using SNPE (Snap Dragon Neural Processing Engine) to run AI models on it. Outside a Docker container I'm able to access the GPU normally. Inside it I can't.

To know if the GPU is available or not, SNPE SDK has a CLI command called snpe-platform-validator.

Running it outside the Docker:

snpe-platform-validator --runtime gpu --debug

I receive:

PF_VALIDATOR: DEBUG: Calling PlatformValidator->setRuntime
PF_VALIDATOR: DEBUG: Calling PlatformValidator->RuntimeCheck
PF_VALIDATOR: DEBUG: Building and running a simple Vector addition gpu program.
Unit Test on the runtime GPU: Passed.
SNPE is supported for runtime GPU on the device.
PF_VALIDATOR: DEBUG: Calling PlatformValidator->IsRuntimeAvailable
Runtime GPU Prerequisites: Present.

Inside the Docker. After installing OpenCL with:

apt install -y ocl-icd-opencl-dev

and running the same command as previously, I've got the following:

PF_VALIDATOR: DEBUG: Calling PlatformValidator->setRuntime
PF_VALIDATOR: DEBUG: Calling PlatformValidator->RuntimeCheck
PF_VALIDATOR: ERROR: Failed to query OpenCL platform.
Unit Test on the runtime GPU: Failed.
SNPE is NOT supported for runtime GPU on the device.
PF_VALIDATOR: DEBUG: Calling PlatformValidator->IsRuntimeAvailable
Runtime GPU Prerequisites: Present.
Error in saving the results root

Anyone has experience with Qualcomm device or had experience on accessing GPU hardware inside a Docker container?

Installing OpenCL drivers inside the Docker container.

0

There are 0 best solutions below