[Adding Opencl On Dev C

0 views
Skip to first unread message

Amancio Mccrae

unread,
Jun 11, 2024, 3:53:30 AM6/11/24
to disoloome

i. first i need to build an OpenCL ICD loader which will load shared library (libOpenCL.so) whose name is on first line of .icd file. Is that enough to find new hardware device in OpenCL?
ii. secondly, i have to modify CL/cl.h file by adding a new device type say for example XYX such as
#define CL_DEVICE_TYPE_XYZ (1

Even though, when i change the content of test.icd file with libOpenCL.so.1.2, within /etc/OpenCL/vendors/directory, in this case ICD loader is not finding OpenCL platforms.
How shall I use this ICD loader to detect available CPU platforms as well as all OpenCL devices within each platform?

Adding Opencl On Dev C


DOWNLOAD ··· https://t.co/2gHojJWzzy



My typical experimental set-up looks like: a lot of different wires going every corner of the lab, and it is left to collect gigabytes of measurement data in the night. Sometimes I do physics simulation in Labview, too. So I really depend on gigaflops.

I know, that there is already an idea for adding CUDA support. But,not all of us has an nvidia GPU. Typically, at least in our lab, we have Intel i5 CPU and some machines have a minimalist AMD graphics card (other just have an integrated graphics)

So, as I was interested in getting more flops, I wrote an OpenCL dll wrapper, and (doing a naive Mandelbrot-set calculation for testing) I realized 10* speed-up on CPU and 100* speed-up on the gamer gpu of my home PC (compared to the simple, multi-threaded Labview implementation using parallel for loops) Now I'm using this for my projects.

(The parts above are my results, the manufacturer's spec sheets may say a lot more theoretical flops. But, when selecting your device, take memory bandwidth into account, and the kind of parallelism in your code. Some devices dislike the conditional branches in the code, and Mandelbrot set test has conditional branches.)

I do not think on the core mathematics of LV. (GPU-s have huge number of Gigaflops, but a lot of latency and overhead. For example, adding two arrays to each other is a really parallelizable task, but it will run faster on a simple multicore cpu. But, let's say, loading data on a laser spectra (Let's say 10000 elements),doing an inverted discrete fourier transform, to get the pulse shape in time domain, and to add these pulse to itself with different delays, to get autocorrelation curve simulated, is a lot of calculation. Then, read back the results, which also alike 10k elements.)

Maybe, it could look like a parallelized for loop, "i" can be the get_global_id(0) or alike. Of course, not all functions may be allowed in this structure, just mathematic operations, loops, and array indexing, other array functions.

I wholeheartedly agree. It's actually abit strange NI has opted for a propriety standard instead of an open standard that alot more companies has chose to follow. Maybe they could do some VISA-like and combine both OpenCL and Cuda in general VI's but run either depending on card installed.

And, in this kind of system, i can get a lot of performance. (not sure about more complicated situations. I personally prefer to run one big kernel at a time, that runs for some seconds to half a minute typically. That's some scientific simulation, not some small easy picture transformation or graphics stuff.)

Visa being a general collection of VI's for open/read/write/close regardless of the actual device. GPU-code should be the same, we shouldn't have 1 CUDA-implementation and 1 OpenCL, since the commands ought to be similar enough.

Having an OpenCL implementation would make CUDA irrelevant. OpenCL IS the device-independent implementation. Putting another layer of abstraction above it won't really help I think. OpenCL can target CPUs, GPUs and whatever may come in the next years as long as there's an OpenCL driver for it.

I use two desktops and I finally found the time to do a planed hardware swap that required the disassembly of both systems.
Preparing the fresh install of my linux system, I realized that OpenSuse has released Leap 15.2.
Initially I wanted to set up a Tumbleweed System but hey, why not give it a try at this point?!

Installation went flawlessly and I started with setting up opencl with rocm.
I followed this instruction, almost remembered that /opt/rocm needs to be linked to /opt/rocm-x.x.x and fired up clinfo.
1 platform found but 0 device

that pretty much wrote everything that happened in this text file. I did the same with elevated rights and wrote it in another file and loaded both into a compare view.
The point where clinfo ran into problems was trying to access /dev/kfd.
A quick listing showed that on my install /dev/kfd had permissions set to 600. I found a github thread, a year old, where someone ran into the same problem with an ubuntu system.
Solution presented was, as /dev/kfd is controlled by udevd, to write a udev rule.
I created /etc/udev/rules.d/81-kdf.rules and added the line

I followed your advice earlier and was able to runc rocm 3.x, so your instructions are fine. Thanks a lot for that! However, it broke somewhere around version 4.0 and after spending countless hours to no avail, I settled on the dkms install.

No idea how well intel-opencl-runtime supports non-intel systems, but there are 2 other options I would try first : opencl-mesa and opencl-amd .(Actually I would have tried with those 2 before even considering rocm or amdapp-sdk ).

Your system has a modern amd videochipset integrated in your ryzen processor , but you also have a discrete amd videocard using the much older TURKS XT chipset.
They also use different kernel modules .

Having more than one AMD videocard is inevitable if having more than one seat. NVIDIA simply hates Linux. In the past, there were many times when a NVIDIA driver did not fit the newest kernel, so I was forced to use an old kernel.

I've got the impression that the motherboard is the problem. Being stuck with the old BIOS, this is a dead-end. I am thinking of ditching this motherboard and its manufacturer. Which motherboards are good for Linux?

Does it matter if I use the proprietary driver? The wiki says that the proprietary driver works on top of the open source driver, so I am a bit confused what exactly the proprietary driver is. Specifically, if I install the proprietary driver, will it change the outcome of trying to start the Xorg server on the latest BIOS?

amdgpu-pro driver uses the same kernel module as opensource driver and often is troublesome to get to work on archlinux.
Looking back on the posts I realised we only looked at the opencl part, not at the overall configuration .

I'm in exactly the same situation. I have the full eGPU RX 580 for 10.13.4 and not a single Adobe CC app (even the latest update) on macOS recognises it at all. I've been working with AMD on ProRender for Blender on macOS with the eGPU and that is working amazingly well now. But no Adobe CC acceleration.

I read that the AMD WX9100 Radeon Pro GPU is optimised for Adobe Premier CC the other day but I'm assuming it's on Windows not macOS. Hopefully that will happen soon as that GPU is certified by Apple and AMD for eGPU use on macOS.

I have been generally using the eGPUs as "compute assist" devices. So my Laptop has been powering the main display and the eGPUs are added without screens to add OpenCL or Metal computing power. This works perfectly in some applications like Blender 3D but none of the Adobe CC apps recognise the eGPU.

I am very curious what the answer is, as well. I'm very surprised to find so little online about this groundbreaking support from Apple. My MBP has the potential to be far more of a powerhouse, now, but it's difficult to find information on best setups and current stability.

I'll do some testing today for you guys. Latest 10.13.6 with Sonnet eGPU RX 580 and eGPU WX 9100. I'll start with the WX 9100 only because that's "meant" to have full Premier support. I have the latest version of Adobe CC installed.

For me it's way easier to plug in 1 eGPU or 2 eGPUs when I need them as compute units for Blender so I rarely bother hooking up the screen to the GPUs because my laptop powers the screen just fine. I only want the additional compute oomph from the eGPUs.

Apple designed "Metal 2" with eGPU support so that Apps can see the eGPUs when they are attached and react to them. However... I've found that almost no apps do this yet. They need updates to support it.

I'll do a test with some 4k video in Premier (that I know my laptop on it's own could barely play back nevermind edit) and see if having the WX 9100 as solo eGPU will give it a kick. I'll report back ASAP.

Premier Pro CC - it sees and uses the WX 9100 properly - using 4k footage with a Project set to use Metal. I setup some colour correction on all the clips. It plays back ok - not amazing - but better than the Laptop only. Then I went to export it and look at the screenshot. It went and used the Intel HD GPU on it's own. You can see the other two more powerful GPUs are barely being used during the export. So I think there's some work to be done.

795a8134c1
Reply all
Reply to author
Forward
0 new messages