diff --git a/level_zero/core/source/device/device_imp.cpp b/level_zero/core/source/device/device_imp.cpp index 791556204a..ede8929d0a 100644 --- a/level_zero/core/source/device/device_imp.cpp +++ b/level_zero/core/source/device/device_imp.cpp @@ -268,7 +268,9 @@ ze_result_t DeviceImp::getMemoryProperties(uint32_t *pCount, ze_device_memory_pr const auto &deviceInfo = this->neoDevice->getDeviceInfo(); - strcpy_s(pMemProperties->name, ZE_MAX_DEVICE_NAME, getHwHelper().getDeviceMemoryName().c_str()); + std::string memoryName; + getDeviceMemoryName(memoryName); + strcpy_s(pMemProperties->name, ZE_MAX_DEVICE_NAME, memoryName.c_str()); auto &hwInfo = this->getHwInfo(); auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily); pMemProperties->maxClockRate = hwInfoConfig.getDeviceMemoryMaxClkRate(&hwInfo); diff --git a/level_zero/core/source/device/device_imp.h b/level_zero/core/source/device/device_imp.h index c3468258a8..a662919b45 100644 --- a/level_zero/core/source/device/device_imp.h +++ b/level_zero/core/source/device/device_imp.h @@ -111,6 +111,7 @@ struct DeviceImp : public Device { ze_result_t getCsrForLowPriority(NEO::CommandStreamReceiver **csr) override; ze_result_t mapOrdinalForAvailableEngineGroup(uint32_t *ordinal) override; NEO::Device *getActiveDevice() const; + void getDeviceMemoryName(std::string &memoryName); bool toPhysicalSliceId(const NEO::TopologyMap &topologyMap, uint32_t &slice, uint32_t &deviceIndex); bool toApiSliceId(const NEO::TopologyMap &topologyMap, uint32_t &slice, uint32_t deviceIndex); diff --git a/level_zero/core/source/device/device_imp_helper.cpp b/level_zero/core/source/device/device_imp_helper.cpp index d50fdc306c..df0335a480 100644 --- a/level_zero/core/source/device/device_imp_helper.cpp +++ b/level_zero/core/source/device/device_imp_helper.cpp @@ -24,4 +24,8 @@ bool DeviceImp::isMultiDeviceCapable() const { void DeviceImp::processAdditionalKernelProperties(NEO::HwHelper &hwHelper, ze_device_module_properties_t *pKernelProperties) { } + +void DeviceImp::getDeviceMemoryName(std::string &memoryName) { + memoryName = "DDR"; +} } // namespace L0 diff --git a/opencl/source/helpers/CMakeLists.txt b/opencl/source/helpers/CMakeLists.txt index d1d18faaf2..6cd53c8e7f 100644 --- a/opencl/source/helpers/CMakeLists.txt +++ b/opencl/source/helpers/CMakeLists.txt @@ -43,6 +43,7 @@ set(RUNTIME_SRCS_HELPERS_BASE ${CMAKE_CURRENT_SOURCE_DIR}/per_thread_data.h ${CMAKE_CURRENT_SOURCE_DIR}/properties_helper.h ${CMAKE_CURRENT_SOURCE_DIR}/properties_helper.cpp + ${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/queue_helpers.cpp ${CMAKE_CURRENT_SOURCE_DIR}/queue_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/sampler_helpers.h ${CMAKE_CURRENT_SOURCE_DIR}/surface_formats.cpp diff --git a/opencl/source/helpers/queue_helpers.cpp b/opencl/source/helpers/queue_helpers.cpp new file mode 100644 index 0000000000..7b8eef63bb --- /dev/null +++ b/opencl/source/helpers/queue_helpers.cpp @@ -0,0 +1,20 @@ +/* + * Copyright (C) 2018-2021 Intel Corporation + * + * SPDX-License-Identifier: MIT + * + */ + +#include "opencl/source/helpers/queue_helpers.h" + +namespace NEO { +bool isCommandWithoutKernel(uint32_t commandType) { + return ((commandType == CL_COMMAND_BARRIER) || + (commandType == CL_COMMAND_MARKER) || + (commandType == CL_COMMAND_MIGRATE_MEM_OBJECTS) || + (commandType == CL_COMMAND_SVM_FREE) || + (commandType == CL_COMMAND_SVM_MAP) || + (commandType == CL_COMMAND_SVM_MIGRATE_MEM) || + (commandType == CL_COMMAND_SVM_UNMAP)); +} +} // namespace NEO diff --git a/opencl/source/helpers/queue_helpers.h b/opencl/source/helpers/queue_helpers.h index 61531df1e2..f88b0b42ba 100644 --- a/opencl/source/helpers/queue_helpers.h +++ b/opencl/source/helpers/queue_helpers.h @@ -25,16 +25,7 @@ inline void releaseVirtualEvent(CommandQueue &commandQueue) { inline void releaseVirtualEvent(DeviceQueue &commandQueue) { } -inline bool isCommandWithoutKernel(uint32_t commandType) { - return ((commandType == CL_COMMAND_BARRIER) || - (commandType == CL_COMMAND_MARKER) || - (commandType == CL_COMMAND_MIGRATE_MEM_OBJECTS) || - (commandType == CL_COMMAND_RESOURCE_BARRIER) || - (commandType == CL_COMMAND_SVM_FREE) || - (commandType == CL_COMMAND_SVM_MAP) || - (commandType == CL_COMMAND_SVM_MIGRATE_MEM) || - (commandType == CL_COMMAND_SVM_UNMAP)); -} +bool isCommandWithoutKernel(uint32_t commandType); template void retainQueue(cl_command_queue commandQueue, cl_int &retVal) { diff --git a/opencl/source/xe_hp_core/hw_info_xehp.inl b/opencl/source/xe_hp_core/hw_info_xehp.inl index 3fa68553f2..5df2441c9e 100644 --- a/opencl/source/xe_hp_core/hw_info_xehp.inl +++ b/opencl/source/xe_hp_core/hw_info_xehp.inl @@ -150,11 +150,6 @@ void XE_HP_SDV_CONFIG::setupHardwareInfoMultiTile(HardwareInfo *hwInfo, bool set gtSysInfo->MaxEuPerSubSlice = 40; gtSysInfo->MaxSlicesSupported = 1; gtSysInfo->MaxSubSlicesSupported = 1; - - gtSysInfo->L3BankCount = 1; - - gtSysInfo->CCSInfo.IsValid = true; - gtSysInfo->CCSInfo.NumberOfCCSEnabled = 1; } if (setupFeatureTableAndWorkaroundTable) { diff --git a/opencl/test/unit_test/os_interface/linux/drm_mapper_tests.cpp b/opencl/test/unit_test/os_interface/linux/drm_mapper_tests.cpp index 604ef8a5f6..a863e71c04 100644 --- a/opencl/test/unit_test/os_interface/linux/drm_mapper_tests.cpp +++ b/opencl/test/unit_test/os_interface/linux/drm_mapper_tests.cpp @@ -23,12 +23,8 @@ TEST(DrmMapperTests, GivenBcsWhenGettingEngineNodeMapThenExecBltIsReturned) { EXPECT_EQ(DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_BCS), expected); } -TEST(DrmMapperTests, GivenCcsWhenGettingEngineNodeMapThenReturnDefault) { - unsigned int expected = I915_EXEC_DEFAULT; - EXPECT_EQ(DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_CCS), expected); - EXPECT_EQ(DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_CCS1), expected); - EXPECT_EQ(DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_CCS2), expected); - EXPECT_EQ(DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_CCS3), expected); +TEST(DrmMapperTests, GivenCcsWhenGettingEngineNodeMapThenExceptionIsThrown) { + EXPECT_THROW(DrmEngineMapper::engineNodeMap(aub_stream::ENGINE_CCS), std::exception); } TEST(DrmMapperTests, GivenVcsWhenGettingEngineNodeMapThenExceptionIsThrown) { diff --git a/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp b/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp index ee36853f57..d733caf343 100644 --- a/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp +++ b/opencl/test/unit_test/xe_hp_core/copy_engine_tests_xe_hp_core.cpp @@ -32,10 +32,7 @@ struct BlitXE_HP_CORETests : public ::testing::Test { DebugManager.flags.RenderCompressedBuffersEnabled.set(true); DebugManager.flags.EnableLocalMemory.set(true); - HardwareInfo hwInfo = *defaultHwInfo; - hwInfo.featureTable.ftrBcsInfo = 1; - - clDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(&hwInfo)); + clDevice = std::make_unique(MockDevice::createWithNewExecutionEnvironment(defaultHwInfo.get())); } uint32_t blitBuffer(CommandStreamReceiver *csr, const BlitProperties &blitProperties, bool blocking, Device &device) { diff --git a/opencl/test/unit_test/xe_hp_core/xehp/test_local_work_size_xehp.inl b/opencl/test/unit_test/xe_hp_core/xehp/test_local_work_size_xehp.inl index eaa4373866..fffe384e22 100644 --- a/opencl/test/unit_test/xe_hp_core/xehp/test_local_work_size_xehp.inl +++ b/opencl/test/unit_test/xe_hp_core/xehp/test_local_work_size_xehp.inl @@ -112,8 +112,6 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpWhenKernelIsaIsBelowThresholdAn Vec3 offset{0, 0, 0}; DispatchInfo dispatchInfo{pClDevice, &kernel, 1, gws, elws, offset}; - auto maxWgSize = pClDevice->getSharedDeviceInfo().maxWorkGroupSize; - { auto expectedLws = computeWorkgroupSize(dispatchInfo); EXPECT_EQ(64u, expectedLws.x * expectedLws.y * expectedLws.z); @@ -124,8 +122,8 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpWhenKernelIsaIsBelowThresholdAn { auto expectedLws = computeWorkgroupSize(dispatchInfo); - EXPECT_EQ(maxWgSize, expectedLws.x * expectedLws.y * expectedLws.z); - EXPECT_EQ(maxWgSize, expectedLws.x); + EXPECT_EQ(512u, expectedLws.x * expectedLws.y * expectedLws.z); + EXPECT_EQ(512u, expectedLws.x); } mockKernel.mockKernel->slmTotalSize = 0u; @@ -133,8 +131,8 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpWhenKernelIsaIsBelowThresholdAn { auto expectedLws = computeWorkgroupSize(dispatchInfo); - EXPECT_EQ(maxWgSize, expectedLws.x * expectedLws.y * expectedLws.z); - EXPECT_EQ(maxWgSize, expectedLws.x); + EXPECT_EQ(512u, expectedLws.x * expectedLws.y * expectedLws.z); + EXPECT_EQ(512u, expectedLws.x); } mockKernel.kernelInfo.kernelDescriptor.kernelAttributes.barrierCount = 0u; @@ -142,8 +140,8 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, giveXeHpWhenKernelIsaIsBelowThresholdAn pClDevice->getRootDeviceEnvironment().getMutableHardwareInfo()->platform.usRevId = REVISION_B; { auto expectedLws = computeWorkgroupSize(dispatchInfo); - EXPECT_EQ(maxWgSize, expectedLws.x * expectedLws.y * expectedLws.z); - EXPECT_EQ(maxWgSize, expectedLws.x); + EXPECT_EQ(512u, expectedLws.x * expectedLws.y * expectedLws.z); + EXPECT_EQ(512u, expectedLws.x); } } @@ -160,14 +158,9 @@ XEHPTEST_F(XeHPComputeWorkgroupSizeTest, givenSmallKernelAndGwsThatIsNotDivisabl Vec3 offset{0, 0, 0}; DispatchInfo dispatchInfo{pClDevice, &kernel, 1, gws, elws, offset}; - auto maxWgSize = pClDevice->getSharedDeviceInfo().maxWorkGroupSize; - { - auto calculatedLws = computeWorkgroupSize(dispatchInfo); - - auto expectedLws = (maxWgSize < 344) ? 8u : 344u; - - EXPECT_EQ(expectedLws, calculatedLws.x * calculatedLws.y * calculatedLws.z); - EXPECT_EQ(expectedLws, calculatedLws.x); + auto expectedLws = computeWorkgroupSize(dispatchInfo); + EXPECT_EQ(344u, expectedLws.x * expectedLws.y * expectedLws.z); + EXPECT_EQ(344u, expectedLws.x); } } diff --git a/shared/source/helpers/hw_helper.h b/shared/source/helpers/hw_helper.h index 4d64d29e1a..1993e7b634 100644 --- a/shared/source/helpers/hw_helper.h +++ b/shared/source/helpers/hw_helper.h @@ -95,7 +95,6 @@ class HwHelper { virtual const StackVec getThreadsPerEUConfigs() const = 0; virtual bool getEnableLocalMemory(const HardwareInfo &hwInfo) const = 0; virtual std::string getExtensions() const = 0; - virtual std::string getDeviceMemoryName() const = 0; static uint32_t getMaxThreadsForVfe(const HardwareInfo &hwInfo); virtual uint32_t getMetricsLibraryGenId() const = 0; virtual uint32_t getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const = 0; @@ -274,8 +273,6 @@ class HwHelperHw : public HwHelper { std::string getExtensions() const override; - std::string getDeviceMemoryName() const override; - uint32_t getMetricsLibraryGenId() const override; uint32_t getMocsIndex(const GmmHelper &gmmHelper, bool l3enabled, bool l1enabled) const override; diff --git a/shared/source/helpers/hw_helper_bdw_plus.inl b/shared/source/helpers/hw_helper_bdw_plus.inl index db3effa132..63aa62b261 100644 --- a/shared/source/helpers/hw_helper_bdw_plus.inl +++ b/shared/source/helpers/hw_helper_bdw_plus.inl @@ -139,9 +139,4 @@ bool HwHelperHw::additionalPipeControlArgsRequired() const { return false; } -template -std::string HwHelperHw::getDeviceMemoryName() const { - return "DDR"; -} - } // namespace NEO diff --git a/shared/source/helpers/hw_helper_xehp_plus.inl b/shared/source/helpers/hw_helper_xehp_plus.inl index 6a0c735a93..90c7fbb2ff 100644 --- a/shared/source/helpers/hw_helper_xehp_plus.inl +++ b/shared/source/helpers/hw_helper_xehp_plus.inl @@ -193,9 +193,4 @@ inline bool HwHelperHw::preferSmallWorkgroupSizeForKernel(const size_ return true; } -template -std::string HwHelperHw::getDeviceMemoryName() const { - return "HBM"; -} - } // namespace NEO diff --git a/shared/source/os_interface/linux/drm_engine_mapper.cpp b/shared/source/os_interface/linux/drm_engine_mapper.cpp index e4c6eff029..b6ee7c7fc1 100644 --- a/shared/source/os_interface/linux/drm_engine_mapper.cpp +++ b/shared/source/os_interface/linux/drm_engine_mapper.cpp @@ -8,16 +8,13 @@ #include "shared/source/os_interface/linux/drm_engine_mapper.h" #include "shared/source/helpers/debug_helpers.h" -#include "shared/source/helpers/engine_node_helper.h" #include "drm/i915_drm.h" namespace NEO { unsigned int DrmEngineMapper::engineNodeMap(aub_stream::EngineType engineType) { - if (EngineHelpers::isCcs(engineType)) { - return I915_EXEC_DEFAULT; - } else if (aub_stream::ENGINE_RCS == engineType) { + if (aub_stream::ENGINE_RCS == engineType) { return I915_EXEC_RENDER; } else if (aub_stream::ENGINE_BCS == engineType) { return I915_EXEC_BLT; diff --git a/shared/source/sku_info/definitions/sku_info.h b/shared/source/sku_info/definitions/sku_info.h index 8d1374fb91..9fd4c04b0d 100644 --- a/shared/source/sku_info/definitions/sku_info.h +++ b/shared/source/sku_info/definitions/sku_info.h @@ -15,7 +15,7 @@ namespace NEO { using BcsInfoMask = std::bitset<1>; struct FeatureTable : FeatureTableBase { - BcsInfoMask ftrBcsInfo = 1; + BcsInfoMask ftrBcsInfo = 0; }; struct WorkaroundTable : WorkaroundTableBase {}; diff --git a/target_unit_tests/xe_hp_core/CMakeLists.txt b/target_unit_tests/xe_hp_core/CMakeLists.txt deleted file mode 100644 index 6b5834b312..0000000000 --- a/target_unit_tests/xe_hp_core/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_XE_HP_CORE) - add_subdirectories() -endif() diff --git a/target_unit_tests/xe_hp_core/xe_hp_sdv/CMakeLists.txt b/target_unit_tests/xe_hp_core/xe_hp_sdv/CMakeLists.txt deleted file mode 100644 index a8a6b5a3d5..0000000000 --- a/target_unit_tests/xe_hp_core/xe_hp_sdv/CMakeLists.txt +++ /dev/null @@ -1,9 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_XE_HP_SDV) - include(${CMAKE_CURRENT_SOURCE_DIR}${BRANCH_DIR_SUFFIX}/enable_xe_hp_sdv_testing.cmake) -endif() diff --git a/target_unit_tests/xe_hp_core/xe_hp_sdv/enable_xe_hp_sdv_testing.cmake b/target_unit_tests/xe_hp_core/xe_hp_sdv/enable_xe_hp_sdv_testing.cmake deleted file mode 100644 index 82988128b4..0000000000 --- a/target_unit_tests/xe_hp_core/xe_hp_sdv/enable_xe_hp_sdv_testing.cmake +++ /dev/null @@ -1,10 +0,0 @@ -# -# Copyright (C) 2021 Intel Corporation -# -# SPDX-License-Identifier: MIT -# - -if(TESTS_XE_HP_SDV) - set(unit_test_config "xe_hp_sdv/2/4/5/0") # non-zero values for unit tests - include(${NEO_SOURCE_DIR}/cmake/run_ult_target.cmake) -endif()