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
والد ae46d57519
کامیت 9b5cbd37a2
7فایلهای تغییر یافته به همراه33 افزوده شده و 53 حذف شده
@@ -111,14 +111,13 @@ bool HostQueue::terminate() {
void HostQueue::finish() {
Command* command = nullptr;
bool isCacheFlushed = device().IsCacheFlushed(Device::CacheState::kCacheStateSystem);
if (IS_HIP) {
command = getLastQueuedCommand(true);
if (AMD_DIRECT_DISPATCH && isCacheFlushed && command == nullptr) {
if (AMD_DIRECT_DISPATCH && command == nullptr) {
return;
}
}
if (nullptr == command || !isCacheFlushed || vdev()->isHandlerPending()) {
if (nullptr == command || vdev()->isHandlerPending()) {
if (nullptr != command) {
command->release();
}
@@ -127,7 +126,7 @@ void HostQueue::finish() {
if (command == NULL) {
return;
}
ClPrint(LOG_DEBUG, LOG_CMD, "Marker queued, Cache Flushed = %d", isCacheFlushed);
ClPrint(LOG_DEBUG, LOG_CMD, "Marker queued to ensure finish");
command->enqueue();
}
// Check HW status of the ROCcrl event. Note: not all ROCclr modes support HW status