SWDEV-222949 - hipEventRecord
hipEventRecord should always create a new marker so it can track work going on at the time the API is called.
Change-Id: I10ce98044be894fbacab8798441ec3d3f2753b93
[ROCm/clr commit: eb132ccef8]
Bu işleme şunda yer alıyor:
işlemeyi yapan:
Christophe Paquot
ebeveyn
1da44b1e01
işleme
06ab4fdf36
@@ -133,6 +133,8 @@ void Event::addMarker(amd::HostQueue* queue, amd::Command* command) {
|
||||
|
||||
stream_ = queue;
|
||||
|
||||
if (event_ == &command->event()) return;
|
||||
|
||||
if (event_ != nullptr) {
|
||||
event_->release();
|
||||
}
|
||||
@@ -229,9 +231,11 @@ hipError_t hipEventRecord(hipEvent_t event, hipStream_t stream) {
|
||||
|
||||
hip::Event* e = reinterpret_cast<hip::Event*>(event);
|
||||
|
||||
hip::Stream* s = reinterpret_cast<hip::Stream*>(stream);
|
||||
amd::HostQueue* queue = hip::getQueue(stream);
|
||||
|
||||
amd::Command* command = queue->getLastQueuedCommand(true);
|
||||
amd::Command* command = (s != nullptr && (s->flags & hipStreamNonBlocking)) ?
|
||||
queue->getLastQueuedCommand(true) : nullptr;
|
||||
|
||||
if (command == nullptr) {
|
||||
command = new amd::Marker(*queue, false);
|
||||
|
||||
Yeni konuda referans
Bir kullanıcı engelle