Repository navigation
Cleaning up HAL timeouts and tunneling iree_hal_device_submit_and_wait through the stack. - #5501
Merged
Merged
Conversation
benvanik
marked this pull request as ready for review
April 18, 2021 08:52
ScottTodd
approved these changes
Apr 19, 2021
This avoids the duplication of _with_deadline/_with_timeout throughout the HAL. This change does not try to optimize any of the use-sites. Some of the Vulkan methods are going rel->abs->rel (and were before, but now it's clear and easy to fix).
This misuse was causing a 16 byte copy to take 7ms o_o
benvanik
force-pushed
the
benvanik-hal-submit-and-wait
branch
from
April 19, 2021 17:19
6861032 to
4d25359
Compare
Merged
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
This prepares for thread donation to the task pool by adding
iree_hal_device_submit_and_waitto define an atomic operation that will let us avoid thread switches. In the process of adding yet another _with_deadline and _with_timeout I decided to clean that up to keep the API leaner.This change gets us to the point where we have both the submit and wait happen side-by-side but does not yet implement the task system donation mechanism (tracked in #5507):

(the improvement stands to save ~12us from this 37us execution of a teeny tiny
++idispatch, but that % will be larger on Android which has larger context switch delays - note that not doing this style of work at all is the smartest approach :)