SWDEV-325711 - Node can be enabled/disabled only for kernel, memcpy and memset nodes
Change-Id: Id9c19a14655732d61fccee9c3d1ffa0614123468
[ROCm/clr commit: 0fcc5557bd]
This commit is contained in:
@@ -327,20 +327,19 @@ struct hipGraphNode : public hipGraphNodeDOTAttribute {
|
|||||||
virtual void EnqueueCommands(hipStream_t stream) {
|
virtual void EnqueueCommands(hipStream_t stream) {
|
||||||
// If the node is disabled it becomes empty node. To maintain ordering just enqueue marker.
|
// If the node is disabled it becomes empty node. To maintain ordering just enqueue marker.
|
||||||
// Node can be enabled/disabled only for kernel, memcpy and memset nodes.
|
// Node can be enabled/disabled only for kernel, memcpy and memset nodes.
|
||||||
if (isEnabled_) {
|
if (!isEnabled_ &&
|
||||||
for (auto& command : commands_) {
|
(type_ == hipGraphNodeTypeKernel || type_ == hipGraphNodeTypeMemcpy ||
|
||||||
command->enqueue();
|
type_ == hipGraphNodeTypeMemset)) {
|
||||||
command->release();
|
amd::Command::EventWaitList waitList;
|
||||||
}
|
amd::HostQueue* queue = hip::getQueue(stream);
|
||||||
} else {
|
amd::Command* command = new amd::Marker(*queue, !kMarkerDisableFlush, waitList);
|
||||||
if (type_ == hipGraphNodeTypeKernel || type_ == hipGraphNodeTypeMemcpy ||
|
command->enqueue();
|
||||||
type_ == hipGraphNodeTypeMemset) {
|
command->release();
|
||||||
amd::Command::EventWaitList waitList;
|
return;
|
||||||
amd::HostQueue* queue = hip::getQueue(stream);
|
}
|
||||||
amd::Command* command = new amd::Marker(*queue, !kMarkerDisableFlush, waitList);
|
for (auto& command : commands_) {
|
||||||
command->enqueue();
|
command->enqueue();
|
||||||
command->release();
|
command->release();
|
||||||
}
|
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
ihipGraph* GetParentGraph() { return parentGraph_; }
|
ihipGraph* GetParentGraph() { return parentGraph_; }
|
||||||
|
|||||||
Reference in New Issue
Block a user