[Issue]: Gaussian and AverageBlur are stateful, enforce serialization
Nobody has claimed this yet.
Assessment
- Difficulty
- 5/5
- Estimated time
- Over a week
- Newbie friendliness
- 35/100
- Issue type
- Refactor
- Clarity
- Needs clarification
- Activity status
- Quiet
- Tech stack
- cpp
- Domain
- computer-vision, performance
Research direction
Start with the Gaussian and AverageBlur operator implementations, focusing on their constructors and operator() calls. Trace how filter weights are allocated and used across host and device execution, then define a design that avoids unsafe shared state without sacrificing asynchronous pipelining. The issue does not name tests or provide a final acceptance condition.
Written by the indexing model from the issue text.
Description
The Gaussian and AverageBlur operators in their current implementation are stateful, allocating host and potentially device memory in their constructors. This memory is used to hold the weights for the filters, which are calculated from the kernel size parameters to those arguments.
To prevent concurrency bugs from back-to-back / multi-threaded operator invocations as they read/write this shared memory, synchronization via a hipEvent and mutex can force the operator calls to be serialized. While this serialization provides safety, it ruins asynchronous execution in pipelining. Furthermore, providing synchronization on both CPU and GPU simultaneously is a bit complicated and raises many edge cases.
Other considered approaches include recalculating weights on the fly or allocating memory in the operator() call itself, rather than the constructor, so that it can be stateless and not require synchronization, but these would seem to require an excessive performance hit.
- Dominant language
- C++
- Stars
- 1
- Forks
- 10
- Avg merge
- 3d 1h
- Merged PRs (30d)
- 1
Contributor guide
No contributing guide indexed for this repository
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
More from ROCm/rocCV
-
enhancement
-
Difficulty 4/5 3-5 days Newbie friendliness 55/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
-
Difficulty 5/5 Over a week Newbie friendliness 35/100
Similar issues
-
Difficulty 2/5 1-3 hours Newbie friendliness 86/100
-
Sensor initialization takes very long when `--initial-sim-time` is set to current UNIX timestamp Open
Difficulty 2/5 1-3 hours Newbie friendliness 78/100
gazebosim/gz-sensors#662 · 1 comment ·
-
enhancement
Difficulty 2/5 1-3 hours Newbie friendliness 76/100
-
comp-datalake
Difficulty 2/5 1-3 hours Newbie friendliness 88/100
ClickHouse/ClickHouse#121222 ·
-
Difficulty 2/5 1-3 hours Newbie friendliness 68/100
LadybirdBrowser/ladybird#12123 ·