rocr: Change hsaKmtQueueRingDoorbell interface (#2068)
WSL uses the call just for the thread wake-up, however under Windows KMD needs the actual value (SWDEV-568592). The interface is changed to avoid programming of a modified write_ptr value, which somewhat changes the client's logic.
Tá an tiomantas seo le fáil i:
tiomanta ag
GitHub
tuismitheoir
e79af13068
tiomantas
f3ffd7070c
@@ -323,7 +323,8 @@ class ThunkLoader {
|
||||
HsaPcSamplingTraceId traceId);
|
||||
typedef HSAKMT_STATUS (HSAKMT_DEF(hsaKmtPcSamplingSupport))(void);
|
||||
typedef HSAKMT_STATUS (HSAKMT_DEF(hsaKmtModelEnabled))(bool* enable);
|
||||
typedef HSAKMT_STATUS (HSAKMT_DEF(hsaKmtQueueRingDoorbell))(HSA_QUEUEID QueueId);
|
||||
typedef HSAKMT_STATUS (HSAKMT_DEF(hsaKmtQueueRingDoorbell))(HSA_QUEUEID QueueId, \
|
||||
HSAuint64 value);
|
||||
typedef HSAKMT_STATUS (HSAKMT_DEF(hsaKmtAisReadWriteFile))(void *devicePtr, \
|
||||
HSAuint64 size, \
|
||||
HSAint32 fd, \
|
||||
|
||||
@@ -471,7 +471,7 @@ uint64_t AqlQueue::AddWriteIndexRelease(uint64_t value) {
|
||||
void AqlQueue::StoreRelaxed(hsa_signal_value_t value) {
|
||||
if (core::Runtime::runtime_singleton_->thunkLoader()->IsDTIF() ||
|
||||
core::Runtime::runtime_singleton_->thunkLoader()->IsDXG()) {
|
||||
HSAKMT_CALL(hsaKmtQueueRingDoorbell(queue_id_));
|
||||
HSAKMT_CALL(hsaKmtQueueRingDoorbell(queue_id_, value));
|
||||
} else {
|
||||
// Hardware doorbell supports AQL semantics.
|
||||
_mm_sfence();
|
||||
|
||||
@@ -785,7 +785,7 @@ void BlitSdma<useGCR>::UpdateWriteAndDoorbellRegister(uint64_t curr_index, uint6
|
||||
*reinterpret_cast<uint64_t*>(queue_resource_.Queue_DoorBell) = new_index;
|
||||
if (core::Runtime::runtime_singleton_->thunkLoader()->IsDXG() ||
|
||||
core::Runtime::runtime_singleton_->thunkLoader()->IsDTIF()) {
|
||||
HSAKMT_CALL(hsaKmtQueueRingDoorbell(queue_resource_.QueueId));
|
||||
HSAKMT_CALL(hsaKmtQueueRingDoorbell(queue_resource_.QueueId, new_index));
|
||||
}
|
||||
|
||||
atomic::Store(&cached_commit_index_, new_index, std::memory_order_release);
|
||||
|
||||
Tagairt in Eagrán Nua
Cuir bac ar úsáideoir