SWDEV-447545 - Fix Enable/Disable node with hipGraph
Node can be enabled/disabled only for kernel, memcpy and memset nodes.
If the node is disabled it becomes empty node.
To maintain ordering just enqueue marker with respective node dependencies.
Change-Id: I710f3e88ab4e76c81f6f86a40a7dc61fd4c7e440
[ROCm/clr commit: e0e63eb04d]
This commit is contained in:
committed by
Saleel Kudchadker
parent
67543a60f1
commit
f1e5162757
@@ -629,7 +629,7 @@ hipError_t GraphExec::Run(hipStream_t stream) {
|
||||
rootCommand->release();
|
||||
}
|
||||
for (int i = 0; i < topoOrder_.size(); i++) {
|
||||
topoOrder_[i]->EnqueueCommands(stream);
|
||||
topoOrder_[i]->EnqueueCommands(reinterpret_cast<hipStream_t>(topoOrder_[i]->GetQueue()));
|
||||
}
|
||||
if (endCommand != nullptr) {
|
||||
endCommand->enqueue();
|
||||
|
||||
@@ -331,6 +331,9 @@ struct GraphNode : public hipGraphNodeDOTAttribute {
|
||||
(type_ == hipGraphNodeTypeKernel || type_ == hipGraphNodeTypeMemcpy ||
|
||||
type_ == hipGraphNodeTypeMemset)) {
|
||||
amd::Command::EventWaitList waitList;
|
||||
if (!commands_.empty()) {
|
||||
waitList = commands_[0]->eventWaitList();
|
||||
}
|
||||
hip::Stream* hip_stream = hip::getStream(stream);
|
||||
amd::Command* command = new amd::Marker(*hip_stream, !kMarkerDisableFlush, waitList);
|
||||
command->enqueue();
|
||||
|
||||
Reference in New Issue
Block a user