powerload

Cannot Get OpenCL on Linux to Work At All

Discussion created by powerload on Feb 15, 2018
Latest reply on Mar 15, 2018 by tkalfaoglu

I have a Vega 56. I downloaded the 17.50 driver, and installed it using:

amdgpu-pro-install --compute

 

# rpm -qa | grep amdgpu | sort

amdgpu-core-17.50-543815.el7.noarch

amdgpu-dkms-17.50-543815.el7.noarch

amdgpu-pro-core-17.50-543815.el7.noarch

clinfo-amdgpu-pro-17.50-543815.el7.x86_64

ids-amdgpu-1.0.0-543815.el7.noarch

libdrm-amdgpu-2.4.82-543815.el7.x86_64

libopencl-amdgpu-pro-17.50-543815.el7.x86_64

libopencl-amdgpu-pro-icd-17.50-543815.el7.x86_64

opencl-amdgpu-pro-17.50-543815.el7.x86_64

 

That installed the driver. Reboot. The kernel driver loads, but I cannot get clinfo to do anything but crash:

 

# /opt/amdgpu-pro/bin/clinfo

terminate called after throwing an instance of 'cl::Error'

  what():  clGetPlatformIDs

Aborted

 

# modprobe amdgpu

 

# lsmod | grep amdgpu

amdgpu               3144014  2

amdttm                110970  1 amdgpu

amdkcl                 24897  3 amdgpu,amdkfd,amdttm

i2c_algo_bit           13413  2 i915,amdgpu

drm_kms_helper        159169  3 i915,amdgpu,nvidia_drm

drm                   370825  15 i915,drm_kms_helper,amdgpu,amdkcl,amdttm,nvidia_drm

i2c_core               40756  8 drm,i915,i2c_i801,i2c_hid,drm_kms_helper,i2c_algo_bit,amdgpu,nvidia

 

# lspci | grep AMD

0c:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 1470 (rev c3)

0d:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 1471

0e:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega [Radeon RX Vega] (rev c3)

0e:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aaf8

10:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 1470 (rev c3)

11:00.0 PCI bridge: Advanced Micro Devices, Inc. [AMD] Device 1471

12:00.0 VGA compatible controller: Advanced Micro Devices, Inc. [AMD/ATI] Vega [Radeon RX Vega] (rev c3)

12:00.1 Audio device: Advanced Micro Devices, Inc. [AMD/ATI] Device aaf8

 

# dmesg | grep amdgpu

[   48.247014] [drm] amdgpu kernel modesetting enabled.

[   48.255686] amdgpu 0000:0e:00.0: enabling device (0006 -> 0007)

[   48.256348] amdgpu 0000:0e:00.0: VRAM: 8176M 0x000000F400000000 - 0x000000F5FEFFFFFF (8176M used)

[   48.256349] amdgpu 0000:0e:00.0: GTT: 256M 0x000000F5FF000000 - 0x000000F60EFFFFFF

[   48.256484] [drm] amdgpu: 8176M of VRAM memory ready

[   48.256485] [drm] amdgpu: 32028M of GTT memory ready.

[   48.256784] amdgpu 0000:0e:00.0: irq 149 for MSI/MSI-X

[   48.256797] amdgpu 0000:0e:00.0: amdgpu: using MSI.

[   48.256962] [drm] amdgpu: irq initialized.

[   48.257136] amdgpu: [powerplay] amdgpu: powerplay sw initialized

[   48.258210] amdgpu 0000:0e:00.0: fence driver on ring 0 use gpu addr 0x000000f5ff400040, cpu addr 0xffffc90007614040

[   48.258279] amdgpu 0000:0e:00.0: fence driver on ring 1 use gpu addr 0x000000f5ff4000c0, cpu addr 0xffffc900076140c0

[   48.258321] amdgpu 0000:0e:00.0: fence driver on ring 2 use gpu addr 0x000000f5ff400140, cpu addr 0xffffc90007614140

[   48.258415] amdgpu 0000:0e:00.0: fence driver on ring 3 use gpu addr 0x000000f5ff4001c0, cpu addr 0xffffc900076141c0

[   48.258444] amdgpu 0000:0e:00.0: fence driver on ring 4 use gpu addr 0x000000f5ff400240, cpu addr 0xffffc90007614240

[   48.258464] amdgpu 0000:0e:00.0: fence driver on ring 5 use gpu addr 0x000000f5ff4002c0, cpu addr 0xffffc900076142c0

[   48.258483] amdgpu 0000:0e:00.0: fence driver on ring 6 use gpu addr 0x000000f5ff400340, cpu addr 0xffffc90007614340

[   48.258503] amdgpu 0000:0e:00.0: fence driver on ring 7 use gpu addr 0x000000f5ff4003c0, cpu addr 0xffffc900076143c0

[   48.258523] amdgpu 0000:0e:00.0: fence driver on ring 8 use gpu addr 0x000000f5ff400440, cpu addr 0xffffc90007614440

[   48.258546] amdgpu 0000:0e:00.0: fence driver on ring 9 use gpu addr 0x000000f5ff4004e0, cpu addr 0xffffc900076144e0

[   48.259015] amdgpu 0000:0e:00.0: fence driver on ring 10 use gpu addr 0x000000f5ff400560, cpu addr 0xffffc90007614560

[   48.259046] amdgpu 0000:0e:00.0: fence driver on ring 11 use gpu addr 0x000000f5ff4005e0, cpu addr 0xffffc900076145e0

[   48.264589] amdgpu 0000:0e:00.0: fence driver on ring 12 use gpu addr 0x000000f4008fa8c0, cpu addr 0xffffc9000c35b8c0

[   48.264627] amdgpu 0000:0e:00.0: fence driver on ring 13 use gpu addr 0x000000f5ff4006e0, cpu addr 0xffffc900076146e0

[   48.264654] amdgpu 0000:0e:00.0: fence driver on ring 14 use gpu addr 0x000000f5ff400760, cpu addr 0xffffc90007614760

[   48.264788] amdgpu 0000:0e:00.0: fence driver on ring 15 use gpu addr 0x000000f5ff4007e0, cpu addr 0xffffc900076147e0

[   48.264812] amdgpu 0000:0e:00.0: fence driver on ring 16 use gpu addr 0x000000f5ff400860, cpu addr 0xffffc90007614860

[   48.264833] amdgpu 0000:0e:00.0: fence driver on ring 17 use gpu addr 0x000000f5ff4008e0, cpu addr 0xffffc900076148e0

[   48.583772] [drm] amdgpu: freesync_module init done ffff8807ef2524c0.

[   48.711184] amdgpu 0000:0e:00.0: fb1: amdgpudrmfb frame buffer device

[   48.711200] amdgpu 0000:0e:00.0: ring 0(gfx) uses VM inv eng 4 on hub 0

[   48.711201] amdgpu 0000:0e:00.0: ring 1(comp_1.0.0) uses VM inv eng 5 on hub 0

[   48.711202] amdgpu 0000:0e:00.0: ring 2(comp_1.1.0) uses VM inv eng 6 on hub 0

[   48.711203] amdgpu 0000:0e:00.0: ring 3(comp_1.2.0) uses VM inv eng 7 on hub 0

[   48.711204] amdgpu 0000:0e:00.0: ring 4(comp_1.3.0) uses VM inv eng 8 on hub 0

[   48.711205] amdgpu 0000:0e:00.0: ring 5(comp_1.0.1) uses VM inv eng 9 on hub 0

[   48.711206] amdgpu 0000:0e:00.0: ring 6(comp_1.1.1) uses VM inv eng 10 on hub 0

[   48.711207] amdgpu 0000:0e:00.0: ring 7(comp_1.2.1) uses VM inv eng 11 on hub 0

[   48.711207] amdgpu 0000:0e:00.0: ring 8(comp_1.3.1) uses VM inv eng 12 on hub 0

[   48.711208] amdgpu 0000:0e:00.0: ring 9(kiq_2.1.7) uses VM inv eng 13 on hub 0

[   48.711209] amdgpu 0000:0e:00.0: ring 10(sdma0) uses VM inv eng 4 on hub 1

[   48.711210] amdgpu 0000:0e:00.0: ring 11(sdma1) uses VM inv eng 5 on hub 1

[   48.711211] amdgpu 0000:0e:00.0: ring 12(uvd) uses VM inv eng 6 on hub 1

[   48.711212] amdgpu 0000:0e:00.0: ring 13(uvd_enc0) uses VM inv eng 7 on hub 1

[   48.711213] amdgpu 0000:0e:00.0: ring 14(uvd_enc1) uses VM inv eng 8 on hub 1

[   48.711214] amdgpu 0000:0e:00.0: ring 15(vce0) uses VM inv eng 9 on hub 1

[   48.711215] amdgpu 0000:0e:00.0: ring 16(vce1) uses VM inv eng 10 on hub 1

[   48.711216] amdgpu 0000:0e:00.0: ring 17(vce2) uses VM inv eng 11 on hub 1

[   48.712240] amdgpu 0000:12:00.0: enabling device (0006 -> 0007)

[   48.713696] amdgpu 0000:12:00.0: VRAM: 8176M 0x000000F400000000 - 0x000000F5FEFFFFFF (8176M used)

[   48.713697] amdgpu 0000:12:00.0: GTT: 256M 0x000000F5FF000000 - 0x000000F60EFFFFFF

[   48.713715] [drm] amdgpu: 8176M of VRAM memory ready

[   48.713717] [drm] amdgpu: 32028M of GTT memory ready.

[   48.714024] amdgpu 0000:12:00.0: irq 150 for MSI/MSI-X

[   48.714036] amdgpu 0000:12:00.0: amdgpu: using MSI.

[   48.714202] [drm] amdgpu: irq initialized.

[   48.714255] amdgpu: [powerplay] amdgpu: powerplay sw initialized

[   48.714751] amdgpu 0000:12:00.0: fence driver on ring 0 use gpu addr 0x000000f5ff400040, cpu addr 0xffffc90007eea040

[   48.714823] amdgpu 0000:12:00.0: fence driver on ring 1 use gpu addr 0x000000f5ff4000c0, cpu addr 0xffffc90007eea0c0

[   48.714846] amdgpu 0000:12:00.0: fence driver on ring 2 use gpu addr 0x000000f5ff400140, cpu addr 0xffffc90007eea140

[   48.714868] amdgpu 0000:12:00.0: fence driver on ring 3 use gpu addr 0x000000f5ff4001c0, cpu addr 0xffffc90007eea1c0

[   48.714889] amdgpu 0000:12:00.0: fence driver on ring 4 use gpu addr 0x000000f5ff400240, cpu addr 0xffffc90007eea240

[   48.714907] amdgpu 0000:12:00.0: fence driver on ring 5 use gpu addr 0x000000f5ff4002c0, cpu addr 0xffffc90007eea2c0

[   48.714926] amdgpu 0000:12:00.0: fence driver on ring 6 use gpu addr 0x000000f5ff400340, cpu addr 0xffffc90007eea340

[   48.714945] amdgpu 0000:12:00.0: fence driver on ring 7 use gpu addr 0x000000f5ff4003c0, cpu addr 0xffffc90007eea3c0

[   48.714963] amdgpu 0000:12:00.0: fence driver on ring 8 use gpu addr 0x000000f5ff400440, cpu addr 0xffffc90007eea440

[   48.714986] amdgpu 0000:12:00.0: fence driver on ring 9 use gpu addr 0x000000f5ff4004e0, cpu addr 0xffffc90007eea4e0

[   48.715292] amdgpu 0000:12:00.0: fence driver on ring 10 use gpu addr 0x000000f5ff400560, cpu addr 0xffffc90007eea560

[   48.715328] amdgpu 0000:12:00.0: fence driver on ring 11 use gpu addr 0x000000f5ff4005e0, cpu addr 0xffffc90007eea5e0

[   48.720789] amdgpu 0000:12:00.0: fence driver on ring 12 use gpu addr 0x000000f4008fa8c0, cpu addr 0xffffc9000d45b8c0

[   48.720819] amdgpu 0000:12:00.0: fence driver on ring 13 use gpu addr 0x000000f5ff4006e0, cpu addr 0xffffc90007eea6e0

[   48.721718] amdgpu 0000:12:00.0: fence driver on ring 14 use gpu addr 0x000000f5ff400760, cpu addr 0xffffc90007eea760

[   48.721787] amdgpu 0000:12:00.0: fence driver on ring 15 use gpu addr 0x000000f5ff4007e0, cpu addr 0xffffc90007eea7e0

[   48.721981] amdgpu 0000:12:00.0: fence driver on ring 16 use gpu addr 0x000000f5ff400860, cpu addr 0xffffc90007eea860

[   48.722720] amdgpu 0000:12:00.0: fence driver on ring 17 use gpu addr 0x000000f5ff4008e0, cpu addr 0xffffc90007eea8e0

[   49.041342] [drm] amdgpu: freesync_module init done ffff8807fcf1c2e0.

[   49.170471] amdgpu 0000:12:00.0: fb2: amdgpudrmfb frame buffer device

[   49.170486] amdgpu 0000:12:00.0: ring 0(gfx) uses VM inv eng 4 on hub 0

[   49.170488] amdgpu 0000:12:00.0: ring 1(comp_1.0.0) uses VM inv eng 5 on hub 0

[   49.170489] amdgpu 0000:12:00.0: ring 2(comp_1.1.0) uses VM inv eng 6 on hub 0

[   49.170490] amdgpu 0000:12:00.0: ring 3(comp_1.2.0) uses VM inv eng 7 on hub 0

[   49.170492] amdgpu 0000:12:00.0: ring 4(comp_1.3.0) uses VM inv eng 8 on hub 0

[   49.170493] amdgpu 0000:12:00.0: ring 5(comp_1.0.1) uses VM inv eng 9 on hub 0

[   49.170494] amdgpu 0000:12:00.0: ring 6(comp_1.1.1) uses VM inv eng 10 on hub 0

[   49.170495] amdgpu 0000:12:00.0: ring 7(comp_1.2.1) uses VM inv eng 11 on hub 0

[   49.170497] amdgpu 0000:12:00.0: ring 8(comp_1.3.1) uses VM inv eng 12 on hub 0

[   49.170498] amdgpu 0000:12:00.0: ring 9(kiq_2.1.7) uses VM inv eng 13 on hub 0

[   49.170499] amdgpu 0000:12:00.0: ring 10(sdma0) uses VM inv eng 4 on hub 1

[   49.170501] amdgpu 0000:12:00.0: ring 11(sdma1) uses VM inv eng 5 on hub 1

[   49.170502] amdgpu 0000:12:00.0: ring 12(uvd) uses VM inv eng 6 on hub 1

[   49.170503] amdgpu 0000:12:00.0: ring 13(uvd_enc0) uses VM inv eng 7 on hub 1

[   49.170504] amdgpu 0000:12:00.0: ring 14(uvd_enc1) uses VM inv eng 8 on hub 1

[   49.170505] amdgpu 0000:12:00.0: ring 15(vce0) uses VM inv eng 9 on hub 1

[   49.170507] amdgpu 0000:12:00.0: ring 16(vce1) uses VM inv eng 10 on hub 1

[   49.170508] amdgpu 0000:12:00.0: ring 17(vce2) uses VM inv eng 11 on hub 1

 

 

All the programs detect Nvidia cards as OpenCL capable, but no matter what paths and libraries from /opt/amdgpu-pro/ subtree I put in LD_LIBRARY_PATH or LD_PRELOAD, nothing ever manages to find any AMD GPUs as OpenCL capable. I even moved all the Nvidia libraries out of the way, but all that does is stop Nvidia cards from getting detected - it doesn't help detection of the AMD GPUs. What am I doing wrong?

 

I wanted to post this in the OpenCL forum, but I cannot seem to post there directly. :-(

Outcomes