-
Notifications
You must be signed in to change notification settings - Fork 548
FEAT: function to pad array borders #2682
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
Conversation
If possible, it would be nice to support periodic padding as I always manually pad periodic image before convolve. It It is slow and memory consuming. I think my application would benefit from this kind of ability. |
@sebastienleclaire That shouldn't be hard I think. I wouldn't be able to say much about performance unless we run nvprof on it. |
For information, this is the function I use for periodic (circularly) padding (it could be use to write and debug new code): array paddingArrayCircularly(const array& arrayToPad,
I'm pretty sure that whatever you come up with will be faster and will consume less memory. As it stand right now, This function use approximately twice the memory inside the array "arrayToPad" to work. |
@sebastienleclaire For the same sizes as you tried, periodic padding has the following global read/write efficiency.
|
I am not sure what the above mean (gld_efficiency and gst_efficiency), but thank you for the periodic padding! |
That is global memory read and write efficiency metric names. |
Add periodic padding support for pad fn
👍 👍 |
Addresses #2676 partially - allows the user to pad inputs and pass to convolve.
Performance comparison of indexing based padding vs kernel in this PR for a HD image is posted
#2676 (comment)