Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Masking: couldn't enqueue kernel! CL_INVALID_KERNEL_ARGS #13120

Closed
kofa73 opened this issue Dec 11, 2022 · 9 comments
Closed

Masking: couldn't enqueue kernel! CL_INVALID_KERNEL_ARGS #13120

kofa73 opened this issue Dec 11, 2022 · 9 comments

Comments

@kofa73
Copy link
Contributor

kofa73 commented Dec 11, 2022

Describe the bug/issue

couldn't enqueue kernel! CL_INVALID_KERNEL_ARGS

when drawn masks are enabled, even if no shapes are used in the module.

To Reproduce
Please provide detailed steps to reproduce the behaviour, for example:

  1. Apply https://discuss.pixls.us/uploads/short-url/cctpu6nAO59WGE5xRHfZc6ARojr.xmp to any raw file.
  2. Check -d opencl logs
  3. See couldn't enqueue kernel! CL_INVALID_KERNEL_ARGS
  4. Check color balance rgb: drawn masks, but no shape assigned.
    image
  5. Switch to blending off, uniformly (parametric mask also shows the error).

Expected behavior
No error, image processed on GPU.

Platform

  • darktable version : 4.1.0+1201~g839b7f063
  • OS : Linux eagle 5.19.0-26-generic #27-Ubuntu SMP PREEMPT_DYNAMIC Wed Nov 23 20:44:15 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
  • Linux - Distro : Ubuntu 22.10
  • Memory : 64 GB
  • Graphics card : NVidia 1060/6GB
  • Graphics driver : 525.60.11-0ubuntu0.22.10.1, also 510.108.03 and 470.161.03-0ubuntu0.22.10.1
  • OpenCL installed : yes
  • OpenCL activated : yes
  • Xorg : 7.7+23ubuntu2
  • Desktop : KDE
  • GTK+ : 3.24.34-3ubuntu2
  • gcc : 12.2.0-3ubuntu1
  • cflags : N/A
  • CMAKE_BUILD_TYPE : Release

Additional context
See https://discuss.pixls.us/t/did-something-change-inside-the-nightly-build-of-diffuse-or-sharpen-module/34038/

Config from Aliks (who originally reported this on Pixls): Linux Mint 20.3 ; NVIDIA GeForce RTX 3060/PCIe/SSE2 v: 4.6.0 NVIDIA 510.108.03

@MStraeten
Copy link
Collaborator

not reproducible with osx, so maybe a system configuration specific issue.
Maybe the result of darktable-cltest can give some hints ...

@kofa73
Copy link
Contributor Author

kofa73 commented Dec 11, 2022

Interesting. For me, it works literally on all raws I've tried (the original CR3, a NEF, an RW2). Linux, Release build.

@kofa73
Copy link
Contributor Author

kofa73 commented Dec 11, 2022

I've tried creating another color balance rgb instance, setting the same values via the UI. That one (#10 below) did not produce the issue. But once I started synchronizing the mask refinement settings, I found that it is enough to set blurring radius to a non-zero value to trigger the issue. Both the 5% value used in the original module instance, as well as 1% work.

No issue:
image

499.061132 [dev_pixelpipe] took 0.004 secs (0.003 CPU) [export] processed `input color profile' on GPU, blended on GPU
image colorspace transform Lab-->RGB took 0.006 secs (0.005 GPU) [colorbalancergb empty]
499.098439 [dev_pixelpipe] took 0.037 secs (0.042 CPU) [export] processed `color balance rgb empty' on GPU, blended on GPU
image colorspace transform RGB-->Lab took 0.005 secs (0.002 GPU) [colorout ]
499.115848 [dev_pixelpipe] took 0.017 secs (0.009 CPU) [export] processed `output color profile' on GPU, blended on GPU

Issue is present:
image

549.828006 [dev_pixelpipe] took 0.004 secs (0.004 CPU) [export] processed `input color profile' on GPU, blended on GPU
image colorspace transform Lab-->RGB took 0.005 secs (0.002 GPU) [colorbalancergb empty]
549.852727 [dt_opencl_enqueue_kernel_2d_with_local] kernel 24 on device 0: CL_INVALID_KERNEL_ARGS
549.858323 [opencl_blendop] couldn't enqueue kernel! CL_INVALID_KERNEL_ARGS
549.858329 [opencl_pixelpipe] [export] could not run module `colorbalancergb' on gpu. falling back to cpu path
550.309126 [dev_pixelpipe] took 0.481 secs (4.399 CPU) [export] processed `color balance rgb empty' on CPU, blended on CPU
image colorspace transform RGB-->Lab took 0.003 secs (0.003 GPU) [colorout ]
550.337124 [dev_pixelpipe] took 0.028 secs (0.024 CPU) [export] processed `output color profile' on GPU, blended on GPU

@AndDiSa
Copy link

AndDiSa commented Dec 11, 2022

It's reproduceable from my side, too. Applying the provided sidecar file immediately leads to the error.

Darktable: darktable 4.1.0+1201~g839b7f063
OS: Linux ThinkBook 6.0.0-1007-oem #7-Ubuntu SMP PREEMPT_DYNAMIC Tue Oct 25 18:05:20 UTC 2022 x86_64 x86_64 x86_64 GNU/Linux
Linux - Distro : Ubuntu 22.04
Memory : 32 GB
Graphics card : NVIDIA GeForce RTX 3060 Laptop GPU 6GB
Graphics driver : 525.60.11
OpenCL installed : yes
OpenCL activated : yes
CMAKE_BUILD_TYPE : Release

@kofa73
Copy link
Contributor Author

kofa73 commented Dec 11, 2022

The same happens if I start with a pristine stack (discard history), enable color balance rgb, select drawn mask, and set blurring radius to 1%.

@jenshannoschwalm
Copy link
Collaborator

We had the big & important #12677, maybe here is an issue.

@kofa73
Copy link
Contributor Author

kofa73 commented Dec 11, 2022

@jenshannoschwalm : confirmed.
4.1.0+677~ga4bd3cd7c has the issue.
4.1.0+667~gebaa525a0 does not.

jenshannoschwalm added a commit to jenshannoschwalm/darktable that referenced this issue Dec 11, 2022
Can confirm the issue @kofa73 reported in darktable-org#13120

Could track down the problem to bee deep in gaussian blur, to get into this i plainly added
debugging messages all done via -d opencl.
@TurboGit
Copy link
Member

Now fixed.

@kofa73
Copy link
Contributor Author

kofa73 commented Dec 12, 2022

Confirmed, thanks!

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants