-
Notifications
You must be signed in to change notification settings - Fork 48
Consistent HOST and HIP/pinned buffers for respective API #628
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
base: develop
Are you sure you want to change the base?
Conversation
… rcm, color temperature
Mem copy elimination
…memcpy_removal
Mem copy elimination version change and Review comments resolved
|
@r-abishek please resolve merge conflicts |
Update patch version from 2.2.0 to 2.2.1
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Pull Request Overview
This PR removes internal host-to-HIP buffer copy functionality from RPP to ensure consistent memory management. GPU APIs now require users to provide HIP/pinned memory buffers directly, eliminating the copy_param_float(), copy_param_uint(), and similar helper functions that previously performed host-to-device copies within RPP.
Key changes include:
- Memory allocation updated from stack arrays to hipHostMalloc in test suite
- API function signatures updated to pass tensor pointers directly to HIP kernels
- Memory management responsibility shifted entirely to the user
Reviewed Changes
Copilot reviewed 28 out of 28 changed files in this pull request and generated 3 comments.
Show a summary per file
| File | Description |
|---|---|
| utilities/test_suite/HIP/Tensor_image_hip.cpp | Updated to use hipHostMalloc for parameter buffers instead of stack arrays; added cleanup code |
| src/modules/tensor/rppt_tensor_geometric_augmentations.cpp | Removed copy_param calls; parameters now passed directly to kernels |
| src/modules/tensor/rppt_tensor_filter_augmentations.cpp | Removed copy_param calls for gaussian_filter |
| src/modules/tensor/rppt_tensor_effects_augmentations.cpp | Removed copy_param calls; added hipHostMalloc for spatter mask arrays |
| src/modules/tensor/rppt_tensor_color_augmentations.cpp | Removed copy_param calls for all color augmentations |
| src/modules/tensor/hip/kernel/*.cpp | Updated function signatures to accept tensor pointers directly |
| src/include/tensor/hip_tensor_executors.hpp | Updated function declarations with new parameters |
| CMakeLists.txt | Version bump from 2.2.0 to 2.2.1; trailing whitespace cleanup |
| CHANGELOG.md | Added entry for memory copy elimination |
💡 Add Copilot custom instructions for smarter, more guided reviews. Learn how to get started.
Address copilot comments for HIP HOST consistent allocation
|
@r-abishek please check and resolve conflicts |
|
@Srihari-mcw @HazarathKumarM please add the doc changes as we discussed offline |
RPP was originally also responsible for host to hip buffer conversions. This was removed during the course of tensor implementations to ensure all RPP HOST API only have HOST buffers, and GPU API only have HIP buffers (or pinned memory for smaller argument buffers).
The following functionality were still using the old style host->hip memcopy within RPP, and this is now being removed. After this, RPP tensor API will no longer be responsible for any HOST -> HIP buffer copy. The user is responsible to provide HOST buffers for HOST API, and HIP/Pinned memory for GPU API.
copy_param_float(), copy_param_uint() etc perform these copies and are now eliminated.
Just like all other tensor functionalities, pinned memory allocation from test suite is used for samller argument buffers.
These are the changed functionalities:
exposure
blend
brightness
color cast
color twist
constrast
crop mirror normalize
gamma_correction
gaussian_filter
noise
non_linear_blend
resize_mirror_normalize
water
@rrawther Please note equivalent changes in MIVisionX would need to be merged together with this PR.
A patch version change has been done for this tentatively from 2.2.0 to 2.2.1