SWDEV-325711 - Node can be enabled/disabled only for kernel, memcpy and memset nodes

Change-Id: Id9c19a14655732d61fccee9c3d1ffa0614123468


[ROCm/clr commit: 0fcc5557bd]
Этот коммит содержится в:
Anusha GodavarthySurya
2022-12-13 05:08:25 +00:00
родитель e1b559e386
Коммит 09b894eeef
+13 -14
Просмотреть файл
@@ -327,20 +327,19 @@ struct hipGraphNode : public hipGraphNodeDOTAttribute {
virtual void EnqueueCommands(hipStream_t stream) {
// 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.
if (isEnabled_) {
for (auto& command : commands_) {
command->enqueue();
command->release();
}
} else {
if (type_ == hipGraphNodeTypeKernel || type_ == hipGraphNodeTypeMemcpy ||
type_ == hipGraphNodeTypeMemset) {
amd::Command::EventWaitList waitList;
amd::HostQueue* queue = hip::getQueue(stream);
amd::Command* command = new amd::Marker(*queue, !kMarkerDisableFlush, waitList);
command->enqueue();
command->release();
}
if (!isEnabled_ &&
(type_ == hipGraphNodeTypeKernel || type_ == hipGraphNodeTypeMemcpy ||
type_ == hipGraphNodeTypeMemset)) {
amd::Command::EventWaitList waitList;
amd::HostQueue* queue = hip::getQueue(stream);
amd::Command* command = new amd::Marker(*queue, !kMarkerDisableFlush, waitList);
command->enqueue();
command->release();
return;
}
for (auto& command : commands_) {
command->enqueue();
command->release();
}
}
ihipGraph* GetParentGraph() { return parentGraph_; }