Forums - Unable to access OpenCL device on SD845

2 posts / 0 new
Last post
Unable to access OpenCL device on SD845
satre
Join Date: 8 Aug 19
Posts: 1
Posted: Thu, 2019-08-08 14:11

I am having a very weird issue with OpenCL on the Adreno GPU of a Snapdragon 845. This is runnning on an Ubuntu 16.04 system on the board.

The majority of my company's stack is written in Python with specific algorithms and solver libraries written in C++ and HPC languages such as OpenCL. Generally speaking, the application main loop runs in Python and loads extension libraries (.so files) that contain the native code. I am experiencing a very strange issue where all OpenCL API fns fail when they are loaded and executed from a Python context but behave normally when executed from a native C++ executable. Below is a link to a code sample that can be used to replicate this problem.

https://github.com/Satre95/OpenCL-Python-Test

The code sample demonstrates the kind of execution that our stack is built on. It consists of a core C++ lib that uses OpenCL. This lib is built with pybind11 and loaded by our Python stack at runtime as an extension module. The lib interface allows for calling C++ code from Python. These C++ functions in turn call the OpenCL API.

The sample code tests the lib by manually linking it to a C++ binary as well as dynamically loading it from Python. In the former case, the pybind11 interface is unused. The behvaiour that we observe is that the native C++ compiled program runs as expected, but when going the Python route, all OpenCL API functions fail. Using GDB I have verfied that the two computation paths utilize the same shared library object  and follow the same code path within the library.

Since I do not have visibilty into the OpenCL library, I have no information as to why the call fails when the top level fn is originates from Python.

Would somebody be able to help shed some light on this issue?

 

  • Up0
  • Down0
alis.auxbpn53
Join Date: 29 Aug 22
Posts: 3
Posted: Tue, 2022-09-20 04:42

The most direct method to fix DLL file missing error is copying the missing file from another trusted resource. But you have to make sure the computer is of the same version as yours. If you are using 32-bit version of Windows, copy from and paste to both C:\Windows\System32 directory. If you are using 64-bit version, the OpenCL should be in the path of C:\Windows\SysWOW64. After you get the new OpenCL file, you need to register it. Just follow the steps below to complete the operation. Step 1: Right-click the Start button and choose Windows PowerShell (Admin) to run this tool as administrator. Step 2: Input regsvr32 opencland press Enter to execute the command. Now, you can check if OpenCLnot found error is fixed. https://www.tellculvers.onl/

  • Up0
  • Down0
or Register

Opinions expressed in the content posted here are the personal opinions of the original authors, and do not necessarily reflect those of Qualcomm Incorporated or its subsidiaries (“Qualcomm”). The content is provided for informational purposes only and is not meant to be an endorsement or representation by Qualcomm or any other party. This site may also provide links or references to non-Qualcomm sites and resources. Qualcomm makes no representations, warranties, or other commitments whatsoever about any non-Qualcomm sites or third-party resources that may be referenced, accessible from, or linked to this site.