Project

General

Profile

Bug #11908

Cant activate OpenCL in Windows

Added by Eniz Ka 20 days ago. Updated 19 days ago.

Status:
New
Priority:
Low
Assignee:
-
Category:
-
Target version:
-
Start date:
01/03/2018
Due date:
% Done:

0%

Affected Version:
2.4.0
System:
Windows
bitness:
64-bit
hardware architecture:
amd64/x86

Description

C:\Program Files\darktable\bin>darktable-cltest.exe
[opencl_init] opencl related configuration options:
[opencl_init]
[opencl_init] opencl: 1
[opencl_init] opencl_library: ''
[opencl_init] opencl_memory_requirement: 768
[opencl_init] opencl_memory_headroom: 300
[opencl_init] opencl_device_priority: '*/!0,*/*/*'
[opencl_init] opencl_mandatory_timeout: 200
[opencl_init] opencl_size_roundup: 16
[opencl_init] opencl_async_pixelpipe: 0
[opencl_init] opencl_synch_cache: 0
[opencl_init] opencl_number_event_handles: 25
[opencl_init] opencl_micro_nap: 1000
[opencl_init] opencl_use_pinned_memory: 0
[opencl_init] opencl_use_cpu_devices: 0
[opencl_init] opencl_avoid_atomics: 0
[opencl_init]
[opencl_init] found opencl runtime library 'OpenCL.dll'
[opencl_init] opencl library 'OpenCL.dll' found on your system and loaded
[opencl_init] found 2 platforms
[opencl_init] found 3 devices
[opencl_init] discarding CPU device 0 ` Intel(R) Core(TM) i7-3632QM CPU @ 2.20GHz'.
[opencl_init] device 1 `Intel(R) HD Graphics 4000' supports image sizes of 16384 x 16384
[opencl_init] device 1 `Intel(R) HD Graphics 4000' allows GPU memory allocations of up to 350MB
[opencl_init] device 1: Intel(R) HD Graphics 4000
GLOBAL_MEM_SIZE: 1400MB
MAX_WORK_GROUP_SIZE: 512
MAX_WORK_ITEM_DIMENSIONS: 3
MAX_WORK_ITEM_SIZES: [ 512 512 512 ]
DRIVER_VERSION: 10.18.10.4358
DEVICE_VERSION: OpenCL 1.2
[opencl_init] compiling program `demosaic_ppg.cl' ..
[opencl_fopen_stat] could not open file `C:\Users\EK\AppData\Local\Microsoft\Windows\INetCache\darktable/cached_kernels_for_IntelRHDGraphics4000/demosaic_ppg.cl.bin.56ac8b023c68a58d3ee5aeb10e6d0fac'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `C:\Program Files\darktable\share\darktable/kernels/demosaic_ppg.cl'
[opencl_build_program] could not build program: -43
[opencl_build_program] BUILD STATUS: -2
BUILD LOG:

[opencl_init] failed to compile program `demosaic_ppg.cl'!
[opencl_init] FINALLY: opencl is NOT AVAILABLE on this system.
[opencl_init] initial status of opencl enabled flag is OFF.

press any key to exit

My PC spec:
CPU: Intel I7 - 960 3.2Ghz
GPU: Intel HD Graphics 4000 and NVidia GT 730M 4GB
RAM: 16GB
OS: Windows 10 x64

GPU-Z shows that my card supports OpenCL 1.2 (CUDA)

History

#1 Updated by Peter Budai 19 days ago

NVidia GT 730M supports only OpenCL 1.1 (see https://www.geforce.com/hardware/notebook-gpus/geforce-gt-730m/specifications). I'm not sure what is the minimum requirement, but I recall something like you need at least OpenCL 1.2, so that's not likely to work.

Your Intel HD 4000 has only 350 MB memory for allocation, and that is way to low.

Please read the usermanual on OpenCL here:
http://www.darktable.org/usermanual/en/darktable_and_opencl.html

#2 Updated by Roman Lebedev 19 days ago

Peter Budai wrote:

NVidia GT 730M supports only OpenCL 1.1 (see https://www.geforce.com/hardware/notebook-gpus/geforce-gt-730m/specifications). I'm not sure what is the minimum requirement, but I recall something like you need at least OpenCL 1.2, so that's not likely to work.

Last time i checked it was stated like "1.0 minus the bits that were deprecated later on in 1.1/1.2"

Your Intel HD 4000 has only 350 MB memory for allocation, and that is way to low.

Please read the usermanual on OpenCL here:
http://www.darktable.org/usermanual/en/darktable_and_opencl.html

#3 Updated by Eniz Ka 19 days ago

Hi Peter,
Actually my GPUZ Shows that my card supports OpenCL 1.2. I double checked.
I installed the darktable in a folder location without spaces in the path.

Was: Ex: "C:\Program Files\darktable"
Now isL "C:\darktable"

and now the error -43 is gone and now the error is:

[opencl_init] compiling program `demosaic_ppg.cl' ..
[opencl_fopen_stat] could not open file `C:\Users\EK\AppData\Local\Microsoft\Windows\INetCache\darktable/cached_kernels_for_IntelRHDGraphics4000/basic.cl.bin.8d8ce8f0d70148b459fc938bee468921'!
[opencl_load_program] could not load cached binary program, trying to compile source
[opencl_load_program] successfully loaded program from `C:\darktable\share\darktable/kernels/demosaic_ppg.cl'
[opencl_build_program] could not build program: -11
[opencl_build_program] BUILD STATUS: -2
BUILD LOG:
:21:10: fatal error: 'common.h' file not found
#include "common.h" 

I tried to include declarations from the common.h to demosaic_ppg.cl as macros and it compiled fine. Bu all files requiring common.h fails.

I suppose that the problem is that OpenCl configuration cant find common.h because of wrong path. Maybe Windows & Linux issues but i dont have a time to compile it under Windows now.

#4 Updated by Eniz Ka 19 days ago

My workaround was to copy all constants and functions

-----> common.h

int
FC(const int row, const int col, const unsigned int filters)
{
  return filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3;
}

to the file ----> demosaic_ppg.cl

  #define FC(row,col, filters) (filters >> ((((row) << 1 & 14) + ((col) & 1)) << 1) & 3)


This can cause side effects but i just wanted to try:

Also im not sure how this function can be translated to the macro

int
FCxtrans(const int row, const int col, global const unsigned char (*const xtrans)[6]) {
return xtrans[row % 6][col % 6];
}

Also available in: Atom PDF