-
Notifications
You must be signed in to change notification settings - Fork 3k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Create new stream for data copy for IOBidning input scenario #14719
Conversation
Stream* device_stream = nullptr; | ||
#ifdef ORT_ENABLE_STREAM | ||
DeviceStreamCollectionHolder device_stream_collection_holder(session_state); | ||
if (device_stream_collection_holder.p_ != nullptr) { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
@@ -507,6 +507,48 @@ static common::Status CopyInputsAcrossDevices(const SessionState& session_state, | |||
return Status::OK(); | |||
} | |||
|
|||
#ifdef ORT_ENABLE_STREAM | |||
struct DeviceStreamCollectionHolder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lei just move this func to a new place. the original implementation is to use this holder as a guard to make sure if any error happened we return the device streams to session state correctly.
@@ -507,6 +507,48 @@ static common::Status CopyInputsAcrossDevices(const SessionState& session_state, | |||
return Status::OK(); | |||
} | |||
|
|||
#ifdef ORT_ENABLE_STREAM | |||
struct DeviceStreamCollectionHolder { |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
Lei just move this func to a new place. the original implementation is to use this holder as a guard to make sure if any error happened we return the device streams to session state correctly.
/azp run MacOS CI Pipeline |
Azure Pipelines successfully started running 1 pipeline(s). |
### Description Create new stream for data copy for IOBidning input scenario ### Motivation and Context Previously in bindInput(), a nullptr Stream is passed to copy data cross device. This caused the default stream is used thus hurt the performance. This PR is to fix #14484 --------- Co-authored-by: Lei Cao <[email protected]>
### Description Create new stream for data copy for IOBidning input scenario ### Motivation and Context Previously in bindInput(), a nullptr Stream is passed to copy data cross device. This caused the default stream is used thus hurt the performance. This PR is to fix #14484 --------- Co-authored-by: Lei Cao <[email protected]>
Description
Create new stream for data copy for IOBidning input scenario
Motivation and Context
Previously in bindInput(), a nullptr Stream is passed to copy data cross device. This caused the default stream is used thus hurt the performance.
This PR is to fix #14484