Skip to content

Commit 3a4dd88

Browse files
committed
[SYCL][NFC] Small adjustments of UpdateHostRequirementCommand.
Changed where UpdateHostRequirementCommand is put in, previously it was always added to write leafs, now it is added to read or write leafs depending on the type of host accessor. + Fixed UpdateHostRequirementCommand::printDot, now it prints access mode of dependency rather than alloca command. Signed-off-by: Vlad Romanov <[email protected]>
1 parent bcf38cf commit 3a4dd88

File tree

2 files changed

+3
-7
lines changed

2 files changed

+3
-7
lines changed

sycl/source/detail/scheduler/commands.cpp

Lines changed: 1 addition & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -424,9 +424,7 @@ void UpdateHostRequirementCommand::printDot(std::ostream &Stream) const {
424424
for (const auto &Dep : MDeps) {
425425
Stream << " \"" << this << "\" -> \"" << Dep.MDepCommand << "\""
426426
<< " [ label = \"Access mode: "
427-
<< accessModeToString(
428-
Dep.MAllocaCmd->getAllocationReq()->MAccessMode)
429-
<< "\\n"
427+
<< accessModeToString(Dep.MReq->MAccessMode) << "\\n"
430428
<< "MemObj: " << Dep.MAllocaCmd->getSYCLMemObj() << " \" ]"
431429
<< std::endl;
432430
}

sycl/source/detail/scheduler/graph_builder.cpp

Lines changed: 2 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -167,10 +167,8 @@ UpdateHostRequirementCommand *Scheduler::GraphBuilder::insertUpdateHostReqCmd(
167167
UpdateCommand->addDep(DepDesc{Dep, StoredReq, AllocaCmd});
168168
Dep->addUser(UpdateCommand);
169169
}
170-
// access::mode::read_write is always used here regardless of requieremnt
171-
// access mode because this node shouldn't be skipped.
172-
UpdateLeafs(Deps, Record, access::mode::read_write);
173-
AddNodeToLeafs(Record, UpdateCommand, access::mode::read_write);
170+
UpdateLeafs(Deps, Record, Req->MAccessMode);
171+
AddNodeToLeafs(Record, UpdateCommand, Req->MAccessMode);
174172
return UpdateCommand;
175173
}
176174

0 commit comments

Comments
 (0)