HIP: bug fixes and optimizations#9635
Merged
chvamshi-xilinx merged 1 commit intoXilinx:masterfrom Mar 2, 2026
Merged
Conversation
- Remove the kernelParams null check in hip_module_launch_kernel(). kernelParams is allowed to be null for kernels that take no parameters. - Set the command state to init before submitting each node so executable graphs can be replayed. - Use single loop: set stream, wait on deps, then submit/enqueue in one pass - Use static_pointer_cast for event commands after get_type() check - Cache command type in cmd_type to avoid repeated get_type() calls Signed-off-by: Srikanth Vuppala <120363307+svup-xilinx@users.noreply.github.com>
Contributor
|
clang-tidy review says "All clean, LGTM! 👍" |
chvamshi-xilinx
approved these changes
Mar 2, 2026
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.
Problem solved by the commit
bug fixes and optimizations
Bug / issue (if any) fixed, which PR introduced the bug, how it was discovered
hip_module_launch_kernel() rejected null kernelParams even though kernels with no parameters are allowed to pass null.
Command state was not reset before submitting, so executable graphs could not be replayed after the first run.
How problem was solved, alternative solutions (if any) and why they were rejected
The null check on kernelParams was removed in hip_module_launch_kernel() so kernels with no parameters can be launched with kernelParams == nullptr.
Before submitting each node in graph_exec::execute(), the command’s state is set to command::state::init, so the same graph executable can be run again.
Risks (if any) associated the changes in the commit
Low
What has been tested and how, request additional testing if necessary
Tested with test cases that has kernelParams == nullptr and repeated launch of executable graph
Documentation impact (if any)
NA