Enable BCS split in OCL

Signed-off-by: Lukasz Jobczyk <lukasz.jobczyk@intel.com>
This commit is contained in:
Lukasz Jobczyk
2022-09-07 17:32:16 +00:00
committed by Compute-Runtime-Automation
parent 4395e0c3a1
commit 3a7f266d66
18 changed files with 79 additions and 3 deletions

View File

@@ -397,7 +397,8 @@ uint64_t Device::getProfilingTimerClock() {
bool Device::isBcsSplitSupported() {
auto bcsSplit = HwInfoConfig::get(getHardwareInfo().platform.eProductFamily)->isBlitSplitEnqueueWARequired(getHardwareInfo()) &&
ApiSpecificConfig::isBcsSplitWaSupported();
ApiSpecificConfig::isBcsSplitWaSupported() &&
Device::isBlitSplitEnabled();
if (DebugManager.flags.SplitBcsCopy.get() != -1) {
bcsSplit = DebugManager.flags.SplitBcsCopy.get();

View File

@@ -106,6 +106,7 @@ class Device : public ReferenceTrackedObject<Device> {
bool isFullRangeSvm() const {
return getRootDeviceEnvironment().isFullRangeSvm();
}
static bool isBlitSplitEnabled();
bool isBcsSplitSupported();
bool areSharedSystemAllocationsAllowed() const;
template <typename SpecializedDeviceT>

View File

@@ -0,0 +1,16 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/device/device.h"
namespace NEO {
bool Device::isBlitSplitEnabled() {
return true;
}
} // namespace NEO

View File

@@ -9,7 +9,6 @@
#include "shared/source/aub/aub_center.h"
#include "shared/source/debug_settings/debug_settings_manager.h"
#include "shared/source/device/device.h"
#include "shared/source/device/root_device.h"
#include "shared/source/execution_environment/root_device_environment.h"
#include "shared/source/helpers/compiler_hw_info_config.h"

View File

@@ -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;

View File

@@ -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)));

View File

@@ -13,6 +13,7 @@ struct UltHwConfig {
bool useMockedPrepareDeviceEnvironmentsFunc = true;
bool forceOsAgnosticMemoryManager = true;
bool useWaitForTimestamps = false;
bool useBlitSplit = false;
bool csrFailInitDirectSubmission = false;
bool csrBaseCallDirectSubmissionAvailable = false;

View File

@@ -175,6 +175,7 @@ set(neo_libult_SRCS_LINUX
${NEO_SHARED_TEST_DIRECTORY}/common/libult/os_interface.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/linux/mock_drm_memory_manager.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/linux/mock_drm_memory_manager.h
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/device_ult.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_direct_submission_controller_enabled.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/create_drm_memory_manager.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/linux/drm_memory_manager_fixture.cpp
@@ -186,6 +187,7 @@ set(neo_libult_SRCS_LINUX
set_property(GLOBAL APPEND PROPERTY neo_libult_SRCS_LINUX ${neo_libult_SRCS_LINUX})
set(neo_libult_SRCS_WINDOWS
${NEO_SHARED_TEST_DIRECTORY}/common/libult/os_interface.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/device_ult.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_direct_submission_controller_enabled.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/mocks/mock_wddm.cpp
${NEO_SHARED_TEST_DIRECTORY}/common/os_interface/windows/create_wddm_memory_manager.cpp

View File

@@ -0,0 +1,17 @@
/*
* Copyright (C) 2022 Intel Corporation
*
* SPDX-License-Identifier: MIT
*
*/
#include "shared/source/device/device.h"
#include "shared/test/common/helpers/ult_hw_config.h"
namespace NEO {
bool Device::isBlitSplitEnabled() {
return ultHwConfig.useBlitSplit;
}
} // namespace NEO

View File

@@ -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

View File

@@ -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);

View File

@@ -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;