SWDEV-352001 - Store last scopes for dispatch

- Store last fence scopes and use the last value to determine if we need a cache flush again. This helps cases where hipExtLaunchKernel API is
used.
- Purge code for ROC_EVENT_NO_FLUSH

Change-Id: I531cf9c9c60d5e2b3a9e265d0f52f79ed2fa8a8c
This commit is contained in:
Saleel Kudchadker
2022-09-20 21:56:02 -07:00
parent ae46d57519
commit 9b5cbd37a2
7 changed files with 33 additions and 53 deletions
-12
View File
@@ -2656,18 +2656,6 @@ void Device::getHwEventTime(const amd::Event& event, uint64_t* start, uint64_t*
}
}
// ================================================================================================
bool Device::IsCacheFlushed(Device::CacheState state) const {
return ROC_EVENT_NO_FLUSH ?
(static_cast<int>(state) == cache_state_.load(std::memory_order_relaxed)) : true;
}
// ================================================================================================
void Device::SetCacheState(Device::CacheState state) {
cache_state_.store(static_cast<int>(state), std::memory_order_relaxed);
}
// ================================================================================================
static void callbackQueue(hsa_status_t status, hsa_queue_t* queue, void* data) {
if (status != HSA_STATUS_SUCCESS && status != HSA_STATUS_INFO_BREAK) {