← 返回首页
Fix race condition in OpenCL kernel by frasercrmck · Pull Request #3535 · arrayfire/arrayfire · GitHub
Skip to content

Navigation Menu

Toggle navigation
Sign in
Appearance settings
Search or jump to...

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Include my email address so I can be contacted

Saved searches

Use saved searches to filter your results more quickly

Appearance settings
Resetting focus
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension .cl  (1) .hpp  (1) All 2 file types selected Viewed files
Conversations
Failed to load comments. Retry
Loading
Jump to
Jump to file
Failed to load files. Retry
Loading
Diff view
Unified
Split
Hide whitespace
Apply and reload
Show whitespace
Diff view
Unified
Split
Hide whitespace
Apply and reload
6 changes: 0 additions & 6 deletions src/backend/opencl/kernel/flood_fill.cl
Show comments View file Edit file Delete file Open in desktop
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
Original file line number Diff line number Diff line change
Expand Up @@ -42,13 +42,7 @@ int barrierOR(local int *predicates) {
barrier(CLK_LOCAL_MEM_FENCE);
}
int retVal = predicates[0];
#if AF_IS_PLATFORM_NVIDIA
// Without the extra barrier sync after reading the reduction result,
// the caller's loop is going into infinite loop occasionally which is
// in turn randoms hangs. This doesn't seem to be an issue on non-nvidia
// hardware. Hence, the check.
barrier(CLK_LOCAL_MEM_FENCE);
#endif
return retVal;
}

Expand Down
2 changes: 0 additions & 2 deletions src/backend/opencl/kernel/flood_fill.hpp
Show comments View file Edit file Delete file Open in desktop
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
Original file line number Diff line number Diff line change
Expand Up @@ -84,8 +84,6 @@ void floodFill(Param out, const Param image, const Param seedsx,
DefineKeyValue(LMEM_WIDTH, (THREADS_X + 2 * RADIUS)),
DefineKeyValue(LMEM_HEIGHT, (THREADS_Y + 2 * RADIUS)),
DefineKeyValue(GROUP_SIZE, (THREADS_Y * THREADS_X)),
DefineKeyValue(AF_IS_PLATFORM_NVIDIA, (int)(AFCL_PLATFORM_NVIDIA ==
getActivePlatformVendor())),
getTypeBuildDefinition<T>()};

auto floodStep =
Expand Down
Toggle all file notes Toggle all file annotations

Footer

© 2026 GitHub, Inc.