mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-04 15:53:45 +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
@@ -1,5 +1,5 @@
|
||||
#
|
||||
# Copyright (C) 2020-2022 Intel Corporation
|
||||
# Copyright (C) 2020-2023 Intel Corporation
|
||||
#
|
||||
# SPDX-License-Identifier: MIT
|
||||
#
|
||||
@@ -17,6 +17,7 @@ set(NEO_CORE_DIRECT_SUBMISSION
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/direct_submission_hw_diagnostic_mode.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/direct_submission_hw_diagnostic_mode.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/direct_submission_properties.h
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/relaxed_ordering_helper.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/relaxed_ordering_helper.h
|
||||
)
|
||||
|
||||
|
||||
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
|
||||
@@ -11,7 +11,10 @@
|
||||
#include "shared/source/command_container/encode_alu_helper.h"
|
||||
|
||||
namespace NEO {
|
||||
class CommandStreamReceiver;
|
||||
|
||||
namespace RelaxedOrderingHelper {
|
||||
bool isRelaxedOrderingDispatchAllowed(const CommandStreamReceiver &csr, uint32_t numWaitEvents);
|
||||
|
||||
static constexpr uint32_t queueSizeMultiplier = 4;
|
||||
|
||||
|
||||
Reference in New Issue
Block a user