Merged
Conversation
6444202 to
0bbeec0
Compare
- Convert global variable canny::counter to class local variable
- Use texture objects rather than texture reference for cc >= 3.0, since texture reference must be declared as a static global variable which results in race condition when ran concurrently
- Refrain from using global variable in row_filter and column_filter (converts column_filter::c_kernel and row_filter::c_kernel to local variables)
6444202 to
d8727f5
Compare
Contributor
Author
|
@alalek |
Member
|
@nglee It is sporadic failure, just ignore that. We usually re-trigger these builds manually or you can push "amended" commit into your branch to trigger all builds again. |
Merged
This was referenced Jun 14, 2020
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Current implementation of CUDA Canny algorithm is not safe for concurrent execution with multiple streams for several reasons:
canny::counter,column_filter::c_kernel,row_filter::c_kernel)canny::tex_srcandcanny::tex_magare used and since texture references must be declared as static global variables, this results in a race conditionThis PR fixes these issues by 1) converting global variables to class local variables, and 2) using texture objects instead of texture references when cc >= 3.0.
A new test suite
CUDA_ImgProc/Canny.Asyncis introduced to check multi stream safety. This test fails if above issues are not handled. This test is disabled for cc < 3.0 since texture reference issue cannot be solved for them.This PR also fixes #11193.