Add functional description for runtime eager progress#270
Draft
sophimao wants to merge 2 commits intointel:mainfrom
Draft
Add functional description for runtime eager progress#270sophimao wants to merge 2 commits intointel:mainfrom
sophimao wants to merge 2 commits intointel:mainfrom
Conversation
zibaiwan
previously approved these changes
Sep 20, 2023
Contributor
zibaiwan
left a comment
There was a problem hiding this comment.
Thanks Sophie. The proposal looks very good and informative. I might be able to provide more comments after I do more research about my multi-threading support project.
docs/eager_progress.md
Outdated
| |:--:| | ||
| |Figure 3: Runtime hung when launching the same kernel for multiple times, without fask kernel relaunch| | ||
|
|
||
| This scenario is mitigated by the introduction of the fast kernel relaunch feature, which enables submission of the kernel device op generated by the launch of the same kernel by `fast_launch_depth` number of time, where `fast_launch_depth` is the depth of the kernel argument preload buffer. (For more details on the Fast Kernel Relaunch feature, please find it in the [Fast Kernel Relaunch FD](https://github.com/intel-innersource/applications.fpga.oneapi.products.acl-docs/blob/986fe42ff647c2a264ed9a440bec3d27dcec3a05/FDs/runtime/opencl_fast_kernel_relaunch_fd.docx).) With this feature, there can be `fast_launch_depth`+1 number of kernel device ops in either a `CL_SUBMITTED` or `CL_RUNNING` status, which would resolve the above example illustrated in Figure 3 as now the second kernel device op can be launched without the first kernel device op getting completed. |
Contributor
There was a problem hiding this comment.
Unfortunately, we can't put the Fast Kernel Relaunch FD link here since it's internal. However, I think we can probably copy it into the public repo.
Contributor
Author
There was a problem hiding this comment.
For now I changed it to a public doc page, we can modify the link again when we put the FD in the public repo :)
Currently the runtime uses cooperative scheduling to make forward progress between different command queues and contexts, however, this mechanism sometimes leads to hung in the program if no explicit status update functions or clEnqueue* functions are called. The proposal is to make the runtime a multithreaded model with a background thread constantly updating the runtime event status.
6326af4 to
ba0ad4e
Compare
zibaiwan
approved these changes
Sep 26, 2023
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.
Currently the runtime uses cooperative scheduling to make forward progress between different command queues and contexts, however, this mechanism sometimes leads to hung in the program if no explicit status update functions or
clEnqueue*functions are called. The proposal is to make the runtime a multithreaded model with a background thread constantly updating the runtime event status.