You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Describe the bug
There is currently a bug in the 2D implementation of distance_transform_edt where certain lines of the output have incorrect values due to a bad default choice of internal CUDA grid/block parameters at this size. Fortunately, the 3D distance transform does not suffer from the same issue.
A temporary workaround in release 22.08.00 is to manually specify the block_params argument and set the first parameter to 1. This is smaller than needed for optimal performance, but will ensure a correct result.
In general for 2D images where one axis is larger than 1024, please set block_params=(1, 32, 2). Other than as a workaround for this bug or in case of advanced performance profiling use cases, we recommend leaveling block_params=None to allow internal choice of these kernel launch parameters.
Describe the bug
There is currently a bug in the 2D implementation of
distance_transform_edt
where certain lines of the output have incorrect values due to a bad default choice of internal CUDA grid/block parameters at this size. Fortunately, the 3D distance transform does not suffer from the same issue.A temporary workaround in release 22.08.00 is to manually specify the
block_params
argument and set the first parameter to 1. This is smaller than needed for optimal performance, but will ensure a correct result.In general for 2D images where one axis is larger than 1024, please set
block_params=(1, 32, 2)
. Other than as a workaround for this bug or in case of advanced performance profiling use cases, we recommend leavelingblock_params=None
to allow internal choice of these kernel launch parameters.Steps/Code to reproduce bug
a minimal example
gives this
distances
output where the bright horizontal lines are invalid distanceswhereas calling with
gives the correct result:
Expected behavior
no artifacts with the default choice of
block_params
Environment details (please complete the following information):
cuCIM v22.08.,00
Additional context
Add any other context about the problem here.
The text was updated successfully, but these errors were encountered: