Bug 102491

Summary: OpenCL image processing produces artifacts on Cape Verde 7770
Product: DRI Reporter: ka.nick
Component: DRM/AMDgpu-proAssignee: Default DRI bug account <dri-devel>
Status: RESOLVED MOVED QA Contact:
Severity: normal    
Priority: medium CC: housegregory299, mirh
Version: unspecified   
Hardware: x86-64 (AMD64)   
OS: Linux (All)   
Whiteboard:
i915 platform: i915 features:
Attachments:
Description Flags
Kernel config
none
Dmesg output
none
Clinfo output
none
darktable-cltest output
none
lspci -k output none

Description ka.nick 2017-08-31 08:33:32 UTC
Created attachment 133896 [details]
Kernel config

Trying to couple mainline amdgpu driver with opencl from amdgpu-pro (installed via Gentoo dev-libs/amdgpu-pro-opencl package) to make darktable use opencl again.  Clinfo and apps see the opencl but when trying to create a command queue driver returns CL_OUT_OF_HOST_MEMORY. The same behavior is reported on Ubuntu 16.04.3 as seen here https://redmine.darktable.org/issues/11702

kernel 4.12.0-pf7 
xorg-server-1.19.3
libdrm-2.4.82
xorg-1.19.3
x11-drivers/xf86-video-amdgpu-1.3.0
dev-libs/amdgpu-pro-opencl-17.30.465504
Comment 1 ka.nick 2017-08-31 08:34:07 UTC
Created attachment 133897 [details]
Dmesg output
Comment 2 ka.nick 2017-08-31 08:34:57 UTC
Created attachment 133898 [details]
Clinfo output
Comment 3 ka.nick 2017-08-31 08:35:47 UTC
Created attachment 133899 [details]
darktable-cltest output
Comment 4 ka.nick 2017-08-31 08:37:36 UTC
Created attachment 133900 [details]
lspci -k output
Comment 5 ka.nick 2017-12-28 13:08:08 UTC
I managed to make it work somehow, but it's still unusable due to producing artifacts on images processed using opencl on darktable and few other programs I tried. So probably the title should be changed.

However, CL_OUT_OF_HOST_MEMORY error may be removed via envitonment var setting, namely 

export GPU_FORCE_64BIT_PTR=1

also

export GPU_USE_SYNC_OBJECTS=1
export GPU_MAX_ALLOC_PERCENT=100
export GPU_SINGLE_ALLOC_PERCENT=100
export GPU_MAX_HEAP_SIZE=100

are recommended but I haven't noticed any difference.
What I've noticed, however, is that the driver reports the different amount of available GPU memory each time darktable is started...
Comment 6 Martin Peres 2019-11-19 07:58:32 UTC
-- GitLab Migration Automatic Message --

This bug has been migrated to freedesktop.org's GitLab instance and has been closed from further activity.

You can subscribe and participate further through the new bug through this link to our GitLab instance: https://gitlab.freedesktop.org/drm/amd/issues/13.

Use of freedesktop.org services, including Bugzilla, is subject to our Code of Conduct. How we collect and use information is described in our Privacy Policy.