cancel
Showing results for 
Search instead for 
Did you mean: 

Archives Discussions

markswanson
Adept II

How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

I've found some conflicting information.

It seems OpenCL 1.2 is only possible on Ubuntu 14.04 (and you must downgrade the Linux kernel to 3.19):

Recommended Open CL SDK for use with AMDGPU-PRO on Linux?

Also, some AMD support folks recommend installing APP SDK 3.0, but other AMD support folks say that this is deprecated / incompatible with the newer amgdpu-pro drivers:

Possible bug in AMD App SDK 3.0 install script?

I'm trying various combinations, but I think the motherboard I'm using won't work because it provides an Intel graphics chip (i915) and doesn't provide any way to  disable it - and there seems to be a weird conflict with X11/RX 580/i915. I tried blacklisting the i915, but X11 still seems to find it (via fbdev iirc).

So I've ordered a new motherboard and Ryzen CPU. When I get it, should I be able to use OpenCL += 1.2 with Ubuntu 16.04 or should I downgrade to 14.04? (and downgrade the kernel to 3.19?)

Thanks!

0 Likes
1 Solution

Accepted Solutions
dipak
Staff
Staff

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

APPSDK is no longer compatible with the amdgpu-pro, so you should not install appsdk with this driver.

There is no conflicting information on those threads that you mentioned. Amdgpu-pro does not support SI cards, so, APPSDK with older graphics driver was suggested on this thread Recommended Open CL SDK for use with AMDGPU-PRO on Linux? .

Rx580 is supported by the latest amdgpu-pro, so no need to downgrade in your case.

View solution in original post

0 Likes
11 Replies
dipak
Staff
Staff

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

APPSDK is no longer compatible with the amdgpu-pro, so you should not install appsdk with this driver.

There is no conflicting information on those threads that you mentioned. Amdgpu-pro does not support SI cards, so, APPSDK with older graphics driver was suggested on this thread Recommended Open CL SDK for use with AMDGPU-PRO on Linux? .

Rx580 is supported by the latest amdgpu-pro, so no need to downgrade in your case.

View solution in original post

0 Likes
markswanson
Adept II

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

What about the current ABI mismatches between X11 and the amdgpu-pro drivers?

My Ubuntu 16.04 Xorg.0.log file shows:

[ 6.562] (**) ModulePath set to "/opt/amdgpu-pro/lib/xorg/modules,/opt/amdgpu/lib/xorg/modules,/usr/lib/xorg/modules"
[ 6.562] (II) The server relies on udev to provide the list of input devices.
If no devices become available, reconfigure udev or disable AutoAddDevices.
[ 6.562] (II) Loader magic: 0x5602a733fdc0
[ 6.562] (II) Module ABI versions:
[ 6.562]X.Org ANSI C Emulation: 0.4
[ 6.562]X.Org Video Driver: 20.0
[ 6.562]X.Org XInput driver : 22.1
[ 6.562]

X.Org Server Extension : 9.0

... slightly further down...

[ 6.570] (II) LoadModule: "glx"
[ 6.572] (II) Loading /opt/amdgpu-pro/lib/xorg/modules/extensions/libglx.so
[ 6.590] (II) Module glx: vendor="X.Org Foundation"
[ 6.590]compiled for 1.19.0, module version = 1.0.0
[ 6.590]ABI class: X.Org Server Extension, version 10.0
[ 6.590] (EE) module ABI major version (10) doesn't match the server's version (9)
[ 6.590] (II) UnloadModule: "glx"
[ 6.590] (II) Unloading glx
[ 6.590] (EE) Failed to load module "glx" (module requirement mismatch, 0)
[ 6.590] (II) LoadModule: "amdgpu"
[ 6.590] (II) Loading /opt/amdgpu/lib/xorg/modules/drivers/amdgpu_drv.so
[ 6.591] (II) Module amdgpu: vendor="X.Org Foundation"
[ 6.591]compiled for 1.19.3, module version = 1.4.0
[ 6.592]Module class: X.Org Video Driver
[ 6.592]ABI class: X.Org Video Driver, version 23.0
[ 6.592] (EE) module ABI major version (23) doesn't match the server's version (20)
[ 6.592] (II) UnloadModule: "amdgpu"
[ 6.592] (II) Unloading amdgpu
[

6.592] (EE) Failed to load module "amdgpu" (module requirement mismatch, 0)

Should I use an older amdgpu-pro driver ?

0 Likes
dipak
Staff
Staff

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

What was the driver version which caused this error? Was it the latest  amdgpu-pro 17.50 ( Radeon Software for Linux Release Notes )?

0 Likes
markswanson
Adept II

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

17.50 caused this error.

I checked the /var/log/Xorg.0.log to verify the version - but didn't find any version information related to amdgpu.

Also, I grep'd dmesg output (dmesg | grep amdgpu) and didn't find a version number either.

The Ubuntu 16.04 x86_64 system was installed and updated (sudo apt dist-upgrade) a few days ago.

I'm happy to try alpha/beta drivers, or try anything you'd like.

Heck, if you think it would help I'd ship you the motherboard. It's an ASRock motherboard with the latest BIOS:

$ dmidecode

...

Vendor: American Megatrends Inc.

    Version: P1.90

    Release Date: 05/16/2012

...

Base Board Information

    Manufacturer: ASRock

    Product Name: G31M-GS.

0 Likes
dipak
Staff
Staff

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

It looks like a similar issue was reported under support forum: Amdgpu-pro 17.30-465504 fails to install on 64 bit Ubuntu 16.04 f

Please try out the suggestion mentioned there. If it does not help, please report the issue here:Drivers & Software

Regards,

0 Likes
markswanson
Adept II

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

Oh my, that solved both ABI mismatch problems perfectly!

Thank you so much!

I have the 17.50 amdgpu-pro drivers being used, and my /var/log/Xorg.0.conf has zero errors (EE).

To anyone that stumbles upon this: I recommend reading the article that dipak provided, but to summarize this is what fixed the ABI mismatch issues for me:

sudo apt install --install-recommends linux-generic-hwe-16.04 xserver-xorg-hwe-16.04

Also, all I had to do to get OpenCL working on my RX 580 was this:

$ sudo ./amdgpu-pro-install -y --opencl=legacy

$ sudo reboot

$ clinfo works fine

No OpenCL programs will compile though, as cl.h won't be found.  The solution to that seems to be (undocumented?):

$ sudo apt-get install opencl-headers

At this point my OpenCL test program compiles, links and runs.

Since the latest Ubuntu 16.04 may not work without the hwe update, perhaps an update to the 17.50 install docs is in order? Specifically for:

* hwe

* cl.h

Ah, after testing there was one more thing I had to do that was specific to my motherboard: I had to set DVMT to auto. Any fixed values seemed to cause instability.

I also created this file: /etc/X11/xorg.conf.d/20-amdgpu.conf

with the contents:

Section "Device"

    Identifier "AMD"

    Driver "amdgpu"

EndSection

because I was previously having trouble with the i915 on the motherboard.

With all of the things I changed, I'm not sure this is required. Just mentioning it to be thorough.

0 Likes
tugrul_512bit
Adept III

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

Can we use OpenCL in Ubuntu 16.04 with Epyc?

0 Likes
dipak
Staff
Staff

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

Epyc is supported by the latest ROCm platform (ROCm 1.7) on Ubuntu 16.04. So, ROCm OpenCL stack can be used for this purpose.

tugrul_512bit
Adept III

Re: How to get OpenCL 1.2 on Ubuntu 16.04 x86_64?

Jump to solution

Will I need anything else than my CPU (such as its id value or something like that) to register for ROCm platform support? Or is it directly downloadable+usable?

0 Likes