Add direct dispatch simple hack for testing
The hack dosn't really track the commands status. It may be not
necessary for HIP, but will cause early resource release.
Change-Id: I791ad36dd8abd3b6b3d2c9b16a210a555c08ca64
[ROCm/clr commit: 532f0ae951]
Cette révision appartient à :
1 Parent
f4c4323f8e
révision
a7adace36e
2 fichiers modifiés
+18
-2
Aucun fichier ne correspond à votre recherche
@@ -258,8 +258,22 @@ void Command::enqueue() {
|
||||
}
|
||||
|
||||
ClPrint(LOG_DEBUG, LOG_CMD, "command is enqueued: %p", this);
|
||||
queue_->append(*this);
|
||||
queue_->flush();
|
||||
if (AMD_DIRECT_DISPATCH) {
|
||||
if (type() == CL_COMMAND_MARKER || type() == 0) {
|
||||
setStatus(CL_SUBMITTED);
|
||||
queue_->vdev()->flush();
|
||||
retain();
|
||||
setStatus(CL_COMPLETE);
|
||||
} else {
|
||||
setStatus(CL_SUBMITTED);
|
||||
submit(*queue_->vdev());
|
||||
retain();
|
||||
setStatus(CL_COMPLETE);
|
||||
}
|
||||
} else {
|
||||
queue_->append(*this);
|
||||
queue_->flush();
|
||||
}
|
||||
if ((queue_->device().settings().waitCommand_ && (type_ != 0)) ||
|
||||
((commandWaitBits_ & 0x2) != 0)) {
|
||||
awaitCompletion();
|
||||
|
||||
Référencer dans un nouveau ticket
Bloquer un utilisateur