-
Notifications
You must be signed in to change notification settings - Fork 1.1k
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
Support copying the overlapping region from one buffer to another. #8463
base: main
Are you sure you want to change the base?
Conversation
One of the build bots died? Can we restart one build specifically manually? Or will everything have to rerun? |
Sorry, I had to restart the buildmaster. You may need to rerun everything :-/ |
src/runtime/HalideBuffer.h
Outdated
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.
This is just to satisfy the formatter right?
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.
Yes. I put a comment on it in the PR. I have clang-format-18, but the build bots still run clang-format-17. Version 18 wants this change for some reason.
…stead of being restricted to copy to the entire dst buffer).
272f2d7
to
14c5a3c
Compare
All tests passing. Can we land this? |
TLDR: This PR makes it possible to copy from a smaller buffer to a bigger buffer as well (i.e. blit a buffer onto another buffer). Use case: workaround for #8235: realize pipeline to a buffer that acts as a crop, and then copy the result back.
This PR makes it possible to copy from any buffer to any other buffer with the same number of dimensions. This is in contrast to the original functionality where it tries to copy from src to the entire number of elements in the dst buffer (even if src is smaller).
dst_begin
indevice_copy
.src_begin
anddst_begin
values.CL_MISALIGNED_SUB_BUFFER_OFFSET
#8235 where I make new a new buffer that acts as a crop (but is not), and copy the result back to the original buffer after the pipeline is done.Irrelevant: my clang-format for some reason wanted to move two things in Halide::Runtime::Buffer, which is compatible with the one on the automatic test here. It seems to be the difference between clang-format-17 (github test) and clang-format-18 (my machine).