mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-05 09:09:04 +08:00
Move isRelaxedOrderingDispatchAllowed to common helper
Signed-off-by: Dunajski, Bartosz <bartosz.dunajski@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
37768a15d3
commit
d7aba6747c
30
shared/source/direct_submission/relaxed_ordering_helper.cpp
Normal file
30
shared/source/direct_submission/relaxed_ordering_helper.cpp
Normal file
@@ -0,0 +1,30 @@
|
||||
/*
|
||||
* Copyright (C) 2023 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/source/direct_submission/relaxed_ordering_helper.h"
|
||||
|
||||
#include "shared/source/command_stream/command_stream_receiver.h"
|
||||
#include "shared/source/debug_settings/debug_settings_manager.h"
|
||||
|
||||
namespace NEO {
|
||||
namespace RelaxedOrderingHelper {
|
||||
|
||||
bool isRelaxedOrderingDispatchAllowed(const CommandStreamReceiver &csr, uint32_t numWaitEvents) {
|
||||
if (numWaitEvents == 0u) {
|
||||
return false;
|
||||
}
|
||||
|
||||
uint32_t minimalNumberOfClients = 2;
|
||||
if (DebugManager.flags.DirectSubmissionRelaxedOrderingMinNumberOfClients.get() != -1) {
|
||||
minimalNumberOfClients = static_cast<uint32_t>(DebugManager.flags.DirectSubmissionRelaxedOrderingMinNumberOfClients.get());
|
||||
}
|
||||
|
||||
return (csr.getNumClients() >= minimalNumberOfClients && csr.directSubmissionRelaxedOrderingEnabled());
|
||||
}
|
||||
|
||||
} // namespace RelaxedOrderingHelper
|
||||
} // namespace NEO
|
||||
Reference in New Issue
Block a user