Skip to content

Kernel crashes when processing image in tiles using dask (parallelization issue) #163

@haesleinhuepf

Description

@haesleinhuepf

Dear future-self,

I'm experiencing kernel crashes when processing a big image in tiles. It is likely related to dask's multi-threading / parallel computing and OpenCL.

The issue can be reproduced on an Apple Mac M1 Max when executing this notebook on the full image size (comment out this one line in the second block):
https://github.com/haesleinhuepf/BioImageAnalysisNotebooks/blob/main/docs/32_tiled_image_processing/tiled_nuclei_counting.ipynb

A workaround for making the tiled image processing work is to call this line which will deactivate asynchronous execution of OpenCL kernels:

cle.set_wait_for_kernel_finish(True)

I'm not sure if fixing this is easily possible. It might be easier to suggest users to do parallel computing with separate OpenCL-contexts. See also related: #129

CC @StRigaud (no action item here Stephane, just to let you know)

Cheers,
past-self

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions