[AIMIGRAPHX-885] Clean up pad/slice Copies to use external stream and cleanup memory alloc/dealloc#233
Merged
TedThemistokleous merged 7 commits intorocm7.2_internal_testingfrom Apr 17, 2026
Conversation
…we just pass stream instead of constantly calling ORT to get the compute stream
…emCpyAsync calls per pad This should help with HBM bandwidth utilization.
make asyn calls truly async by working through a pinned memory buffer to ensure we can perform async calls and allow caller to return immediantly instead of block.
should help with the python API and now CopyTensor accepts hipstream for proper sync instead of always syncronizing on the default stream
ahsan-ca
approved these changes
Apr 16, 2026
755ff27
into
rocm7.2_internal_testing
5 of 7 checks passed
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.
Description
Changes should be backwards compatible and when no external stream is used we default to the default hipstream
Motivation and Context
Cleans up and reduces memory overhead by ensuring we're using the correct stream to perform copies on and reduce overall tension through either C or python APIs.
Seeing this with a few a customer workloads where the copies are the larger bottleneck even though the main model runs efficiently. The copies add significant overhead such that any change overshadows perf improvements on MIGraphX under a certain threshold.
Used in tandem with - ROCm/AMDMIGraphX#4775 and saw a large boost in perf which reduced copy overhead