Fixes SWDEV-483388#74
Merged
TedThemistokleous merged 3 commits intorocm6.3_internal_testingfrom Nov 11, 2024
Merged
Conversation
| } else { | ||
| // copy from other CPU memory to GPU, this is blocking | ||
| HIP_CALL_THROW(hipMemcpy(dst_data, src_data, bytes, hipMemcpyHostToDevice)); | ||
| HIP_CALL_THROW(hipMemcpyWithStream(dst_data, src_data, bytes, hipMemcpyHostToDevice, static_cast<hipStream_t>(stream.GetHandle()))); |
Collaborator
There was a problem hiding this comment.
Fix lint. Also, I thought we wanted to block in this case, but I suppose this allows only MIGraphX EP to block on stream now since this gpu_data_transfer isn't shared between both EPs.
| auto output_tensor = ctx.GetOutput(i, ort_shape.data(), ort_shape.size()); | ||
| void* output_data = output_tensor.GetTensorMutableRawData(); | ||
| HIP_CALL_THROW(hipMemcpy(output_data, gpu_res.data(), res_shape.bytes(), hipMemcpyDeviceToDevice)); | ||
| HIP_CALL_THROW(hipMemcpyWithStream(output_data, |
Collaborator
There was a problem hiding this comment.
With MIGraphX we perform the run_async as part of the eval() which streams execution. Were you seeing stale data somehow with this memcopy for networks with many outputs? Tried this with Bert and didn't see a change in perf but curious as to why this changed.
Collaborator
|
merging this as this was put in upstream |
TedThemistokleous
pushed a commit
that referenced
this pull request
Jan 3, 2025
* Fix SWDEV-483388: mistakenly invoke hipMemcpy when ORT_ENABLE_STREAM=True * Fix another hipMemcpy * Remove MIGRAPHX_STREAM_SYNC guard which does not exists in current version.
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.
GPU memory copy should use the provided stream.