Support stream priority for standalone executor #49939
Merged
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.
PR types
New features
PR changes
Others
Describe
在#47411 支持自定义OP执行流基础上,本PR支持在dist_attr中为自定义流指定优先级。
由于流优先级是在底层调用CUDA API创建流时进行指定,在流创建之后不可更改,因此一个流只能对应一个优先级。这个约束由上层进行保证,若出现多个指定了相同流的OP设置了不同的优先级,则该流的优先级会与Program中第一个OP的设定相同。