SWDEV-489084 - Update max streams for graph
Change-Id: I6d0992b2e80ebf3184911593a4f3574327b2e9c3
[ROCm/clr commit: fb7ad8361c]
This commit is contained in:
کامیت شده توسط
Anusha Godavarthy Surya
والد
c34f55babb
کامیت
ac927dd94e
@@ -247,7 +247,7 @@ void Graph::ScheduleOneNode(Node node, int stream_id) {
|
||||
if (node->stream_id_ == -1) {
|
||||
// Assign active stream to the current node
|
||||
node->stream_id_ = stream_id;
|
||||
max_streams_ = std::max(max_streams_, stream_id);
|
||||
max_streams_ = std::max(max_streams_, (stream_id + 1));
|
||||
|
||||
// Update the dependencies if a signal is required
|
||||
for (auto dep: node->GetDependencies()) {
|
||||
@@ -414,7 +414,7 @@ hipError_t GraphExec::Init() {
|
||||
status = CreateStreams(parallelLists_.size() - 1 + min_num_streams);
|
||||
} else {
|
||||
// create extra stream to avoid queue collision with the default execution stream
|
||||
status = CreateStreams(clonedGraph_->max_streams_ + 1);
|
||||
status = CreateStreams(clonedGraph_->max_streams_);
|
||||
}
|
||||
if (status != hipSuccess) {
|
||||
return status;
|
||||
|
||||
@@ -488,7 +488,7 @@ struct Graph {
|
||||
std::unordered_map<UserObject*, int> graphUserObj_;
|
||||
unsigned int id_;
|
||||
static int nextID;
|
||||
int max_streams_ = 0; //!< Maximum number of extra streams used in the graph launch
|
||||
int max_streams_ = 0; //!< Maximum number of streams used in the graph launch
|
||||
uint32_t memalloc_nodes_ = 0; //!< Count of unreleased Memalloc nodes
|
||||
std::vector<Node> roots_; //!< Root nodes, used in parallel launches
|
||||
std::vector<Node> leafs_; //!< The list of leaf nodes on every parallel stream
|
||||
|
||||
مرجع در شماره جدید
Block a user