From 51d922f5a1ac6691ade17c458dff22871cecb11a Mon Sep 17 00:00:00 2001 From: Lukasz Jobczyk Date: Fri, 23 Jun 2023 08:28:45 +0000 Subject: [PATCH] fix: Adjust ULLS init vector for MTL Related-To: NEO-8067 Signed-off-by: Lukasz Jobczyk --- shared/source/xe_hpg_core/hw_info_mtl.cpp | 97 +++++++++---------- .../xe_hpg_core/mtl/hw_info_tests_mtl.cpp | 25 +++++ 2 files changed, 73 insertions(+), 49 deletions(-) diff --git a/shared/source/xe_hpg_core/hw_info_mtl.cpp b/shared/source/xe_hpg_core/hw_info_mtl.cpp index 8c2a30e58e..4a5d58fdd5 100644 --- a/shared/source/xe_hpg_core/hw_info_mtl.cpp +++ b/shared/source/xe_hpg_core/hw_info_mtl.cpp @@ -33,55 +33,54 @@ const PLATFORM MTL::platform = { const RuntimeCapabilityTable MTL::capabilityTable{ EngineDirectSubmissionInitVec{ - {aub_stream::ENGINE_RCS, {true, true}}, - {aub_stream::ENGINE_CCS, {true, true}}}, // directSubmissionEngines - {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties - MemoryConstants::max48BitAddress, // gpuAddressSpace - 0, // sharedSystemMemCapabilities - 83.333, // defaultProfilingTimerResolution - MemoryConstants::pageSize, // requiredPreemptionSurfaceSize - "", // deviceName - PreemptionMode::ThreadGroup, // defaultPreemptionMode - aub_stream::ENGINE_CCS, // defaultEngineType - 0, // maxRenderFrequency - 30, // clVersionSupport - CmdServicesMemTraceVersion::DeviceValues::Mtl, // aubDeviceId - 0, // extraQuantityThreadsPerEU - 64, // slmSize - sizeof(MTL::GRF), // grfSize - 36u, // timestampValidBits - 32u, // kernelTimestampValidBits - false, // blitterOperationsSupported - true, // ftrSupportsInteger64BitAtomics - true, // ftrSupportsFP64 - false, // ftrSupportsFP64Emulation - true, // ftrSupports64BitMath - true, // ftrSvm - false, // ftrSupportsCoherency - false, // ftrSupportsVmeAvcTextureSampler - false, // ftrSupportsVmeAvcPreemption - false, // ftrRenderCompressedBuffers - false, // ftrRenderCompressedImages - true, // ftr64KBpages - true, // instrumentationEnabled - false, // sourceLevelDebuggerSupported - false, // supportsVme - true, // supportCacheFlushAfterWalker - true, // supportsImages - false, // supportsDeviceEnqueue - false, // supportsPipes - true, // supportsOcl21Features - false, // supportsOnDemandPageFaults - false, // supportsIndependentForwardProgress - false, // hostPtrTrackingEnabled - true, // levelZeroSupported - true, // isIntegratedDevice - true, // supportsMediaBlock - false, // p2pAccessSupported - false, // p2pAtomicAccessSupported - true, // fusedEuEnabled - true, // l0DebuggerSupported - true // supportsFloatAtomics + {aub_stream::ENGINE_CCS, {true, false, false, true}}}, // directSubmissionEngines + {0, 0, 0, 0, false, false, false, false}, // kmdNotifyProperties + MemoryConstants::max48BitAddress, // gpuAddressSpace + 0, // sharedSystemMemCapabilities + 83.333, // defaultProfilingTimerResolution + MemoryConstants::pageSize, // requiredPreemptionSurfaceSize + "", // deviceName + PreemptionMode::ThreadGroup, // defaultPreemptionMode + aub_stream::ENGINE_CCS, // defaultEngineType + 0, // maxRenderFrequency + 30, // clVersionSupport + CmdServicesMemTraceVersion::DeviceValues::Mtl, // aubDeviceId + 0, // extraQuantityThreadsPerEU + 64, // slmSize + sizeof(MTL::GRF), // grfSize + 36u, // timestampValidBits + 32u, // kernelTimestampValidBits + false, // blitterOperationsSupported + true, // ftrSupportsInteger64BitAtomics + true, // ftrSupportsFP64 + false, // ftrSupportsFP64Emulation + true, // ftrSupports64BitMath + true, // ftrSvm + false, // ftrSupportsCoherency + false, // ftrSupportsVmeAvcTextureSampler + false, // ftrSupportsVmeAvcPreemption + false, // ftrRenderCompressedBuffers + false, // ftrRenderCompressedImages + true, // ftr64KBpages + true, // instrumentationEnabled + false, // sourceLevelDebuggerSupported + false, // supportsVme + true, // supportCacheFlushAfterWalker + true, // supportsImages + false, // supportsDeviceEnqueue + false, // supportsPipes + true, // supportsOcl21Features + false, // supportsOnDemandPageFaults + false, // supportsIndependentForwardProgress + false, // hostPtrTrackingEnabled + true, // levelZeroSupported + true, // isIntegratedDevice + true, // supportsMediaBlock + false, // p2pAccessSupported + false, // p2pAtomicAccessSupported + true, // fusedEuEnabled + true, // l0DebuggerSupported + true // supportsFloatAtomics }; WorkaroundTable MTL::workaroundTable = {}; diff --git a/shared/test/unit_test/xe_hpg_core/mtl/hw_info_tests_mtl.cpp b/shared/test/unit_test/xe_hpg_core/mtl/hw_info_tests_mtl.cpp index 96e0f7176c..0bd86d3729 100644 --- a/shared/test/unit_test/xe_hpg_core/mtl/hw_info_tests_mtl.cpp +++ b/shared/test/unit_test/xe_hpg_core/mtl/hw_info_tests_mtl.cpp @@ -55,6 +55,31 @@ MTLTEST_F(MtlHwInfoTests, WhenSetupHardwareInfoWithSetupFeatureTableFlagTrueOrFa EXPECT_TRUE(workaroundTable.flags.waUntypedBufferCompression); } +MTLTEST_F(MtlHwInfoTests, givenMtlCapabilityTableWhenCheckDirectSubmissionEnginesThenProperValuesAreSetToTrue) { + HardwareInfo hwInfo = *defaultHwInfo; + const auto &directSubmissionEngines = hwInfo.capabilityTable.directSubmissionEngines; + + for (uint32_t i = 0; i < aub_stream::NUM_ENGINES; i++) { + switch (i) { + case aub_stream::ENGINE_CCS: + EXPECT_TRUE(directSubmissionEngines.data[i].engineSupported); + EXPECT_FALSE(directSubmissionEngines.data[i].submitOnInit); + EXPECT_FALSE(directSubmissionEngines.data[i].useNonDefault); + EXPECT_TRUE(directSubmissionEngines.data[i].useRootDevice); + EXPECT_FALSE(directSubmissionEngines.data[i].useInternal); + EXPECT_FALSE(directSubmissionEngines.data[i].useLowPriority); + break; + default: + EXPECT_FALSE(directSubmissionEngines.data[i].engineSupported); + EXPECT_FALSE(directSubmissionEngines.data[i].submitOnInit); + EXPECT_FALSE(directSubmissionEngines.data[i].useNonDefault); + EXPECT_FALSE(directSubmissionEngines.data[i].useRootDevice); + EXPECT_FALSE(directSubmissionEngines.data[i].useInternal); + EXPECT_FALSE(directSubmissionEngines.data[i].useLowPriority); + } + } +} + MTLTEST_F(MtlHwInfoTests, WhenSetupHardwareInfoWithSetupFeatureTableFlagTrueOrFalseIsCalledThenFeatureTableHasCorrectValueOfFtrLinearCCS) { HardwareInfo hwInfo = *defaultHwInfo; auto compilerProductHelper = CompilerProductHelper::create(hwInfo.platform.eProductFamily);