Hello all, thanks for time and effort in advance. For a university assignment on computer tomography, I wrote a little OpenCL program (~1000 lines total) that reads a square greyscale image, computes the radon transform, filters the radon transform and computes the corresponding back projection.
So far I have tested said program on my 2017 12" Macbook, my Linux machine (Ubuntu 20.04, i9 9900K, 6900XT, 32GB of RAM) and on the windows machine on a friend (Windows 10, Ryzen 5 1500X, GTX 1050, 16GB of RAM), achieving mixed results. The code runs mostly fine on my Macbook and perfectly fine on my friends Nvidia GTX 1050 with current OpenCL drivers for Windows (tested with image resolutions 64x64, 128x128, 256x256, 512x512, 1024x1024, 2048x2048 and 4096x4096), which makes me quite confident in my code. However the OpenCL CPU driver of his Ryzen 5 1500X as well as the OpenCL driver for my 6900XT (from driver 21.10 on Ubuntu 21.10) refuse to execute with image sizes of 1024x1024 and above, throwing a memory related core dump error message.
I am not sure if this is a driver issue or an issue with my source code, but have limited experience with OpenCL development in general. If it is of any help, I can post further details and give you my code to test.
@dipak Hello dipak, I think creating a minimal example that produces the issue is not helpful (because I would just delete parts of the main program, the program fails in the first OpenCL-kernel "compute_sinogram.cl" already), but if you insist, I will try doing that.
Here is a link to a github repository containing my code, the clinfo output, as well as screenshots of the core dump on my AMD card and a successful run on my CPU. All the additional info is in the folder "Debug"
If there is anything else I can do, please tell me! Thanks a lot in advance for your time.
Edit: I forgot to mention that with my new revision of the program, it does not run on the AMD GPU ever. Before I could run it with resolutions below 1024x1024, now it crashes in the first function every time
Hi @FriedrichGuenther ,
the OpenCL driver for my 6900XT (from driver 21.10 on Ubuntu 21.10) ... throwing a memory related core dump error message.
It looks like a more recent AMDGPU-Pro driver (21.20) is available here: amd-radeon-rx-6900-xt . Please try this latest driver and share your observation.
Note: As per the driver release note, Ubuntu 21.10 is not officially supported. Below are the supported Ubuntu versions.
@dipak I will try the newer driver and report back to you. Also I am running Ubuntu 20.04, I just mistyped it before. Sorry for that!
Edit: I just uninstalled the old driver and underwent an install of the new driver. Still the same issue. What happens if you just run the code? Do you get output?
Hi @FriedrichGuenther ,
Thank for the quick update.
Based on the screenshot of the core dump, it looks to me a runtime/compiler issue. I'll report it to the OpenCL team.
By the way, the code ran fine when I tried it on a Windows laptop with Vega device.
@dipak Hey, thank you very much for your effort! That is partially comforting. Hopefully there is an easy fix for this, in 2 weeks time I will present the software and would love to see what my AMD card can do in what time. 🙂
As a slight off-topic question: I want to switch from buffers to image2d_t memory objects but can not get it working. Can I ask this as a question here or is your OpenCL-forum meant for AMD related topics and issues only?
@dipak I have come up with an alternative (very barebones) to the kernel that crashes consistently on my AMD GPU (and also on the Radeon VII of a friend who is running Linux as well), which does work on my GPU. That kernel is too simple for my purposes though, the image quality is significantly worse. Could this kernel help with the debugging process?