Missing syncthreads in CUDA Canny (edgesHysteresisLocalKernel) (Bug #3562)


Added by Julien Demouth about 11 years ago. Updated about 11 years ago.


Status:Done Start date:2014-02-19
Priority:Normal Due date:
Assignee:Vladislav Vinogradov % Done:

0%

Category:gpu (cuda)
Target version:2.4.9
Affected version:2.4.8 (latest release) Operating System:Any
Difficulty: HW Platform:Other
Pull request:https://github.com/Itseez/opencv/pull/2380

Description

The loop starting at line 278 in canny.cu operates on shared memory but does not contain __syncthreads.

Even if the memory is volatile there's no guarantee that it's going to work since the shared memory is modified by different warps.

For example, thread (16, 1) will modify the memory read by thread (17, 2). Those two threads belong to different warps.

I think you need a __syncthreads at line 294 (to avoid RAW hazards) and another one at line 298 (to avoid WAR hazards).


Associated revisions

Revision 7fd21d21
Added by Vladislav Vinogradov about 11 years ago

fix bug #3562:

add missing __syncthreads to edgesHysteresisLocalKernel

Revision ad71efb2
Added by Vadim Pisarevsky about 10 years ago

Merge pull request #3562 from asmorkalov:ocv_aarch64

Revision d86d8ed9
Added by Alexander Alekhin over 9 years ago

Merge 2.4 into master

PR #2968: cce2d99 8578f9c
Fixed bug which caused crash of GPU version of feature matcher in stitcher

The bug caused crash of GPU version of feature matcher in stitcher when
we use ORB features.

PR #3236: 5947519
Check sure that we're not already below required leaf false alarm rate before continuing to get negative samples.

PR #3190
fix blobdetector

PR #3562 (part): 82bd82e
TBB updated to 4.3u2. Fix for aarch64 support.

PR #3604 (part): 091c7a3
OpenGL interop sample reworked not ot use cvconfig.h

PR #3792: afdf319
Add -L for CUDA libs path to pkg-config

Add all dirs from CUDA_LIBS_PATH as -L linker options to
OPENCV_LINKER_LIBS. These will end up in opencv.pc.

PR #3893: 122b9f8
Turn ocv_convert_to_lib_name into a function

PR #5490: ec5244a
fixed memory leak in findHomography tests

PR #5491: 0d5b739
delete video readers

PR #5574

PR #5202

History

Updated by Alexander Karsakov about 11 years ago

  • Assignee set to Vladislav Vinogradov
  • Category set to gpu (cuda)
  • Status changed from New to Open

Updated by Kirill Kornyakov about 11 years ago

  • Target version set to 2.4.9

Updated by Vladislav Vinogradov about 11 years ago

Hello Jullien,

Thanks you for reporting the issue.
I submitted a pull request with fix.

  • Pull request set to https://github.com/Itseez/opencv/pull/2380
  • Affected version changed from branch 'master' (3.0-dev) to 2.4.8 (latest release)

Updated by Vladislav Vinogradov about 11 years ago

The pull request was merged into 2.4 branch.

  • Status changed from Open to Done

Also available in: Atom PDF