-
Notifications
You must be signed in to change notification settings - Fork 330
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
Batch fill rectangle #65
Conversation
I don't know why black is failing on these files:
I have not touched those, and when i run |
@chjort I added a commit to fix the code. I'll also be changing formatting rules later tonight anyways. The 85 character line length we don't really want anyways. |
to solve the issue upgrade black) |
@chjort this is a great, high quality contribution. Thanks for this. Do you have any interest in contributing some test cases? In particular, I'm interested in adding:
Thanks @chjort, thanks again |
Note: I locally ran the demo scripts and they still work. |
fc408eb
to
4cecb5b
Compare
Actually, this is untested as of now regardless. That's something I will document, but I won't block the PR on it. |
Thanks @chjort - you rock! |
* temporary push benchmark file * temporary push benchmark file * refactor fill_utils.py * refactor * refactor * batch fill_rectangle * small refactor * docstring fix * Fix issue after rebase Co-authored-by: Luke Wood <lukewood@google.com>
* temporary push benchmark file * temporary push benchmark file * refactor fill_utils.py * refactor * refactor * batch fill_rectangle * small refactor * docstring fix * Fix issue after rebase Co-authored-by: Luke Wood <lukewood@google.com>
Vectorized/batched implementation of
fill_rectangle
for significant performance improvements.This implementation has been benchmarked against the non-vectorized implementation of
fill_rectangle
that usestf.map_fn
.The following table summarizes the time (in milliseconds) it takes to fill a batch of rectangles into a batch of 32x32 images. These are the numbers I get on my own machine using GPU.
And plot: