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:
@@ -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
|
||||
|
||||
مرجع در شماره جدید
Block a user