mirror of
https://github.com/intel/compute-runtime.git
synced 2025-09-10 12:53:42 +08:00
Enable BCS split WA in OCL
Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:

committed by
Compute-Runtime-Automation

parent
11374b83af
commit
d672920121
@ -251,6 +251,7 @@ class CommandQueue : public BaseObject<_cl_command_queue> {
|
||||
|
||||
static bool isAssignEngineRoundRobinEnabled();
|
||||
static bool isTimestampWaitEnabled();
|
||||
static bool isBlitSplitEnabled();
|
||||
|
||||
MOCKABLE_VIRTUAL void releaseIndirectHeap(IndirectHeap::Type heapType);
|
||||
|
||||
|
@ -1105,7 +1105,8 @@ size_t CommandQueueHw<GfxFamily>::calculateHostPtrSizeForImage(const size_t *reg
|
||||
|
||||
template <typename GfxFamily>
|
||||
bool CommandQueueHw<GfxFamily>::isSplitEnqueueBlitSupported() {
|
||||
auto bcsSplit = HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily)->isBlitSplitEnqueueWARequired(getDevice().getHardwareInfo());
|
||||
auto bcsSplit = HwInfoConfig::get(getDevice().getHardwareInfo().platform.eProductFamily)->isBlitSplitEnqueueWARequired(getDevice().getHardwareInfo()) &&
|
||||
CommandQueue::isBlitSplitEnabled();
|
||||
|
||||
if (DebugManager.flags.SplitBcsCopy.get() != -1) {
|
||||
bcsSplit = DebugManager.flags.SplitBcsCopy.get();
|
||||
|
@ -17,4 +17,8 @@ bool CommandQueue::isTimestampWaitEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
bool CommandQueue::isBlitSplitEnabled() {
|
||||
return true;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
||||
|
@ -306,6 +306,8 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenCheckIsSplitEnqueueBlit
|
||||
DebugManagerStateRestore restorer;
|
||||
DebugManager.flags.SplitBcsCopy.set(1);
|
||||
auto *cmdQHw = static_cast<CommandQueueHw<FamilyType> *>(this->pCmdQ);
|
||||
VariableBackup<UltHwConfig> backup{&ultHwConfig};
|
||||
ultHwConfig.useBlitSplit = true;
|
||||
{
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
@ -331,6 +333,14 @@ HWTEST_F(IoqCommandQueueHwBlitTest, givenSplitBcsCopyWhenCheckIsSplitEnqueueBlit
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
}
|
||||
{
|
||||
DebugManager.flags.SplitBcsCopy.set(-1);
|
||||
ultHwConfig.useBlitSplit = false;
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::LocalToHost, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
EXPECT_FALSE(cmdQHw->isSplitEnqueueBlitNeeded(TransferDirection::HostToLocal, 64 * MemoryConstants::megaByte, *cmdQHw->getBcsCommandStreamReceiver(aub_stream::EngineType::ENGINE_BCS)));
|
||||
}
|
||||
}
|
||||
|
||||
char hostPtr[16 * MemoryConstants::megaByte];
|
||||
|
@ -19,4 +19,8 @@ bool CommandQueue::isTimestampWaitEnabled() {
|
||||
return ultHwConfig.useWaitForTimestamps;
|
||||
}
|
||||
|
||||
bool CommandQueue::isBlitSplitEnabled() {
|
||||
return ultHwConfig.useBlitSplit;
|
||||
}
|
||||
|
||||
} // namespace NEO
|
@ -895,6 +895,10 @@ TEST(CommandQueueTest, whenCheckEngineTimestampWaitEnabledThenReturnsTrue) {
|
||||
EXPECT_TRUE(CommandQueue::isTimestampWaitEnabled());
|
||||
}
|
||||
|
||||
TEST(CommandQueueTest, whenCheckBlitSplitEnabledThenReturnsTrue) {
|
||||
EXPECT_TRUE(CommandQueue::isBlitSplitEnabled());
|
||||
}
|
||||
|
||||
TEST(PlatformsDestructor, whenGlobalPlatformsDestructorIsCalledThenGlobalPlatformsAreDestroyed) {
|
||||
EXPECT_NE(nullptr, platformsImpl);
|
||||
platformsDestructor();
|
||||
|
@ -165,6 +165,11 @@ bool HwInfoConfigHw<gfxProduct>::isBlitCopyRequiredForLocalMemory(const Hardware
|
||||
return false;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isBlitSplitEnqueueWARequired(const HardwareInfo &hwInfo) const {
|
||||
return true;
|
||||
}
|
||||
|
||||
template <>
|
||||
bool HwInfoConfigHw<gfxProduct>::isImplicitScalingSupported(const HardwareInfo &hwInfo) const {
|
||||
return getSteppingFromHwRevId(hwInfo) >= REVISION_B;
|
||||
|
@ -36,7 +36,7 @@ void NEO::BaseUltConfigListener::OnTestEnd(const ::testing::TestInfo &) {
|
||||
|
||||
// Ensure that global state is restored
|
||||
UltHwConfig expectedState{};
|
||||
static_assert(sizeof(UltHwConfig) == 12 * sizeof(bool), ""); // Ensure that there is no internal padding
|
||||
static_assert(sizeof(UltHwConfig) == 13 * sizeof(bool), ""); // Ensure that there is no internal padding
|
||||
EXPECT_EQ(0, memcmp(&expectedState, &ultHwConfig, sizeof(UltHwConfig)));
|
||||
|
||||
EXPECT_EQ(0, memcmp(&referencedHwInfo.platform, &defaultHwInfo->platform, sizeof(PLATFORM)));
|
||||
|
@ -1,5 +1,5 @@
|
||||
/*
|
||||
* Copyright (C) 2020-2021 Intel Corporation
|
||||
* Copyright (C) 2020-2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
@ -13,6 +13,7 @@ struct UltHwConfig {
|
||||
bool useMockedPrepareDeviceEnvironmentsFunc = true;
|
||||
bool forceOsAgnosticMemoryManager = true;
|
||||
bool useWaitForTimestamps = false;
|
||||
bool useBlitSplit = false;
|
||||
|
||||
bool csrFailInitDirectSubmission = false;
|
||||
bool csrBaseCallDirectSubmissionAvailable = false;
|
||||
|
@ -10,6 +10,7 @@ if(TESTS_PVC)
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_binary_format_ar_tests_pvc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/device_tests_pvc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/dispatch_walker_tests_pvc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/excludes_xe_hpc_core_pvc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/hw_info_tests_pvc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_config_helper_tests_pvc.cpp
|
||||
${CMAKE_CURRENT_SOURCE_DIR}/product_config_tests_pvc.cpp
|
||||
|
@ -0,0 +1,10 @@
|
||||
/*
|
||||
* Copyright (C) 2022 Intel Corporation
|
||||
*
|
||||
* SPDX-License-Identifier: MIT
|
||||
*
|
||||
*/
|
||||
|
||||
#include "shared/test/common/test_macros/hw_test_base.h"
|
||||
|
||||
HWTEST_EXCLUDE_PRODUCT(HwInfoConfigTest, givenHwInfoConfigWhenAskedIfIsBlitSplitEnqueueWARequiredThenReturnFalse, IGFX_PVC);
|
@ -83,6 +83,11 @@ PVCTEST_F(HwInfoConfigTestLinuxPvc, givenOsInterfaceIsNullWhenGetDeviceMemoryPhy
|
||||
EXPECT_EQ(0u, hwInfoConfig->getDeviceMemoryPhysicalSizeInBytes(nullptr, 0));
|
||||
}
|
||||
|
||||
PVCTEST_F(HwInfoConfigTestLinuxPvc, givenHwInfoConfigWhenAskedIsBlitSplitEnqueueWARequiredThenReturnTrue) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
EXPECT_TRUE(hwInfoConfig->isBlitSplitEnqueueWARequired(pInHwInfo));
|
||||
}
|
||||
|
||||
PVCTEST_F(HwInfoConfigTestLinuxPvc, givenOsInterfaceIsNullWhenGetDeviceMemoryMaxBandWidthInBytesPerSecondIsCalledThenReturnZero) {
|
||||
auto hwInfoConfig = HwInfoConfig::get(productFamily);
|
||||
auto testHwInfo = *defaultHwInfo;
|
||||
|
Reference in New Issue
Block a user