Filter L0 Debugger support by platfom
Related-To: NEO-6678 Signed-off-by: Brandon Yates <brandon.yates@intel.com>
This commit is contained in:
parent
489dd4dd03
commit
d70b1a2e2a
|
@ -730,6 +730,11 @@ ze_result_t DeviceImp::getDebugProperties(zet_device_debug_properties_t *pDebugP
|
||||||
isDebugAttachAvailable = false;
|
isDebugAttachAvailable = false;
|
||||||
}
|
}
|
||||||
|
|
||||||
|
auto &hwInfo = neoDevice->getHardwareInfo();
|
||||||
|
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
|
||||||
|
isDebugAttachAvailable = false;
|
||||||
|
}
|
||||||
|
|
||||||
if (isDebugAttachAvailable && !isSubdevice) {
|
if (isDebugAttachAvailable && !isSubdevice) {
|
||||||
pDebugProperties->flags = zet_device_debug_property_flag_t::ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH;
|
pDebugProperties->flags = zet_device_debug_property_flag_t::ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH;
|
||||||
} else {
|
} else {
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2020-2021 Intel Corporation
|
* Copyright (C) 2020-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -13,6 +13,10 @@
|
||||||
|
|
||||||
namespace L0 {
|
namespace L0 {
|
||||||
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
std::unique_ptr<NEO::Debugger> DebuggerL0::create(NEO::Device *device) {
|
||||||
|
auto &hwInfo = device->getHardwareInfo();
|
||||||
|
if (!hwInfo.capabilityTable.l0DebuggerSupported) {
|
||||||
|
return nullptr;
|
||||||
|
}
|
||||||
auto success = initDebuggingInOs(device->getRootDeviceEnvironment().osInterface.get());
|
auto success = initDebuggingInOs(device->getRootDeviceEnvironment().osInterface.get());
|
||||||
if (success) {
|
if (success) {
|
||||||
auto debugger = debuggerL0Factory[device->getHardwareInfo().platform.eRenderCoreFamily](device);
|
auto debugger = debuggerL0Factory[device->getHardwareInfo().platform.eRenderCoreFamily](device);
|
||||||
|
|
|
@ -1,5 +1,5 @@
|
||||||
/*
|
/*
|
||||||
* Copyright (C) 2021 Intel Corporation
|
* Copyright (C) 2021-2022 Intel Corporation
|
||||||
*
|
*
|
||||||
* SPDX-License-Identifier: MIT
|
* SPDX-License-Identifier: MIT
|
||||||
*
|
*
|
||||||
|
@ -63,7 +63,8 @@ TEST_F(DebugApiTest, givenSubDeviceWhenCallingDebugAttachThenErrorIsReturned) {
|
||||||
EXPECT_EQ(nullptr, debugSession);
|
EXPECT_EQ(nullptr, debugSession);
|
||||||
}
|
}
|
||||||
|
|
||||||
TEST_F(DebugApiTest, givenDeviceWhenDebugAttachIsAvaialbleThenGetPropertiesReturnsCorrectFlag) {
|
using isDebugSupportedProduct = IsWithinProducts<IGFX_DG1, IGFX_PVC>;
|
||||||
|
HWTEST2_F(DebugApiTest, givenDeviceWhenDebugAttachIsAvaialbleThenGetPropertiesReturnsCorrectFlag, isDebugSupportedProduct) {
|
||||||
zet_device_debug_properties_t debugProperties = {};
|
zet_device_debug_properties_t debugProperties = {};
|
||||||
debugProperties.flags = ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32;
|
debugProperties.flags = ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32;
|
||||||
|
|
||||||
|
@ -75,6 +76,19 @@ TEST_F(DebugApiTest, givenDeviceWhenDebugAttachIsAvaialbleThenGetPropertiesRetur
|
||||||
EXPECT_EQ(ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH, debugProperties.flags);
|
EXPECT_EQ(ZET_DEVICE_DEBUG_PROPERTY_FLAG_ATTACH, debugProperties.flags);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
using isDebugNotSupportedProduct = IsNotWithinProducts<IGFX_DG1, IGFX_PVC>;
|
||||||
|
HWTEST2_F(DebugApiTest, givenDeviceWhenDebugIsNotSupportedThenGetPropertiesReturnsCorrectFlag, isDebugNotSupportedProduct) {
|
||||||
|
zet_device_debug_properties_t debugProperties = {};
|
||||||
|
debugProperties.flags = ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32;
|
||||||
|
|
||||||
|
neoDevice->executionEnvironment->rootDeviceEnvironments[0]->osInterface.reset(new OsInterfaceWithDebugAttach);
|
||||||
|
|
||||||
|
auto result = zetDeviceGetDebugProperties(device->toHandle(), &debugProperties);
|
||||||
|
|
||||||
|
EXPECT_EQ(ZE_RESULT_SUCCESS, result);
|
||||||
|
EXPECT_EQ(0u, debugProperties.flags);
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(DebugApiTest, givenStateSaveAreaHeaderUnavailableWhenGettingDebugPropertiesThenAttachFlagIsNotReturned) {
|
TEST_F(DebugApiTest, givenStateSaveAreaHeaderUnavailableWhenGettingDebugPropertiesThenAttachFlagIsNotReturned) {
|
||||||
zet_device_debug_properties_t debugProperties = {};
|
zet_device_debug_properties_t debugProperties = {};
|
||||||
debugProperties.flags = ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32;
|
debugProperties.flags = ZET_DEVICE_DEBUG_PROPERTY_FLAG_FORCE_UINT32;
|
||||||
|
|
|
@ -82,7 +82,8 @@ const RuntimeCapabilityTable EHL::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable EHL::workaroundTable = {};
|
WorkaroundTable EHL::workaroundTable = {};
|
||||||
|
|
|
@ -83,7 +83,8 @@ const RuntimeCapabilityTable ICLLP::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable ICLLP::workaroundTable = {};
|
WorkaroundTable ICLLP::workaroundTable = {};
|
||||||
|
|
|
@ -82,7 +82,8 @@ const RuntimeCapabilityTable LKF::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable LKF::workaroundTable = {};
|
WorkaroundTable LKF::workaroundTable = {};
|
||||||
|
|
|
@ -80,7 +80,8 @@ const RuntimeCapabilityTable ADLP::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
true // fusedEuEnabled
|
true, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable ADLP::workaroundTable = {};
|
WorkaroundTable ADLP::workaroundTable = {};
|
||||||
|
|
|
@ -80,7 +80,8 @@ const RuntimeCapabilityTable ADLS::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
true // fusedEuEnabled
|
true, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable ADLS::workaroundTable = {};
|
WorkaroundTable ADLS::workaroundTable = {};
|
||||||
|
|
|
@ -88,7 +88,8 @@ const RuntimeCapabilityTable DG1::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
true, // p2pAccessSupported
|
true, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
true // fusedEuEnabled
|
true, // fusedEuEnabled
|
||||||
|
true, // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable DG1::workaroundTable = {};
|
WorkaroundTable DG1::workaroundTable = {};
|
||||||
|
|
|
@ -80,7 +80,8 @@ const RuntimeCapabilityTable RKL::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
true // fusedEuEnabled
|
true, // fusedEuEnabled
|
||||||
|
false, // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable RKL::workaroundTable = {};
|
WorkaroundTable RKL::workaroundTable = {};
|
||||||
|
|
|
@ -84,7 +84,8 @@ const RuntimeCapabilityTable TGLLP::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
true // fusedEuEnabled
|
true, // fusedEuEnabled
|
||||||
|
false, // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable TGLLP::workaroundTable = {};
|
WorkaroundTable TGLLP::workaroundTable = {};
|
||||||
|
|
|
@ -87,7 +87,8 @@ const RuntimeCapabilityTable BDW::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable BDW::workaroundTable = {};
|
WorkaroundTable BDW::workaroundTable = {};
|
||||||
|
|
|
@ -84,7 +84,8 @@ const RuntimeCapabilityTable BXT::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable BXT::workaroundTable = {};
|
WorkaroundTable BXT::workaroundTable = {};
|
||||||
|
|
|
@ -79,7 +79,8 @@ const RuntimeCapabilityTable CFL::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable CFL::workaroundTable = {};
|
WorkaroundTable CFL::workaroundTable = {};
|
||||||
|
|
|
@ -79,7 +79,8 @@ const RuntimeCapabilityTable GLK::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable GLK::workaroundTable = {};
|
WorkaroundTable GLK::workaroundTable = {};
|
||||||
|
|
|
@ -79,7 +79,8 @@ const RuntimeCapabilityTable KBL::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable KBL::workaroundTable = {};
|
WorkaroundTable KBL::workaroundTable = {};
|
||||||
|
|
|
@ -87,7 +87,8 @@ const RuntimeCapabilityTable SKL::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
false, // p2pAccessSupported
|
false, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
false // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable SKL::workaroundTable = {};
|
WorkaroundTable SKL::workaroundTable = {};
|
||||||
|
|
|
@ -68,6 +68,7 @@ struct RuntimeCapabilityTable {
|
||||||
bool p2pAccessSupported;
|
bool p2pAccessSupported;
|
||||||
bool p2pAtomicAccessSupported;
|
bool p2pAtomicAccessSupported;
|
||||||
bool fusedEuEnabled;
|
bool fusedEuEnabled;
|
||||||
|
bool l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilityTable &rhs) {
|
inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilityTable &rhs) {
|
||||||
|
@ -133,6 +134,7 @@ inline bool operator==(const RuntimeCapabilityTable &lhs, const RuntimeCapabilit
|
||||||
result &= (lhs.isIntegratedDevice == rhs.isIntegratedDevice);
|
result &= (lhs.isIntegratedDevice == rhs.isIntegratedDevice);
|
||||||
result &= (lhs.supportsMediaBlock == rhs.supportsMediaBlock);
|
result &= (lhs.supportsMediaBlock == rhs.supportsMediaBlock);
|
||||||
result &= (lhs.fusedEuEnabled == rhs.fusedEuEnabled);
|
result &= (lhs.fusedEuEnabled == rhs.fusedEuEnabled);
|
||||||
|
result &= (lhs.l0DebuggerSupported == rhs.l0DebuggerSupported);
|
||||||
|
|
||||||
return result;
|
return result;
|
||||||
}
|
}
|
||||||
|
|
|
@ -84,7 +84,8 @@ const RuntimeCapabilityTable XE_HP_SDV::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
true, // p2pAccessSupported
|
true, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
true // fusedEuEnabled
|
true, // fusedEuEnabled
|
||||||
|
true // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable XE_HP_SDV::workaroundTable = {};
|
WorkaroundTable XE_HP_SDV::workaroundTable = {};
|
||||||
|
|
|
@ -93,7 +93,8 @@ const RuntimeCapabilityTable PVC::capabilityTable{
|
||||||
false, // supportsMediaBlock
|
false, // supportsMediaBlock
|
||||||
true, // p2pAccessSupported
|
true, // p2pAccessSupported
|
||||||
true, // p2pAtomicAccessSupported
|
true, // p2pAtomicAccessSupported
|
||||||
false // fusedEuEnabled
|
false, // fusedEuEnabled
|
||||||
|
true // l0DebuggerSupported;
|
||||||
};
|
};
|
||||||
|
|
||||||
void PVC::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
void PVC::setupFeatureAndWorkaroundTable(HardwareInfo *hwInfo) {
|
||||||
|
|
|
@ -84,7 +84,8 @@ const RuntimeCapabilityTable DG2::capabilityTable{
|
||||||
true, // supportsMediaBlock
|
true, // supportsMediaBlock
|
||||||
true, // p2pAccessSupported
|
true, // p2pAccessSupported
|
||||||
false, // p2pAtomicAccessSupported
|
false, // p2pAtomicAccessSupported
|
||||||
true // fusedEuEnabled
|
true, // fusedEuEnabled
|
||||||
|
true // l0DebuggerSupported
|
||||||
};
|
};
|
||||||
|
|
||||||
WorkaroundTable DG2::workaroundTable = {};
|
WorkaroundTable DG2::workaroundTable = {};
|
||||||
|
|
|
@ -849,6 +849,14 @@ struct IsWithinProducts {
|
||||||
}
|
}
|
||||||
};
|
};
|
||||||
|
|
||||||
|
template <PRODUCT_FAMILY productFamilyMin, PRODUCT_FAMILY productFamilyMax>
|
||||||
|
struct IsNotWithinProducts {
|
||||||
|
template <PRODUCT_FAMILY productFamily>
|
||||||
|
static constexpr bool isMatched() {
|
||||||
|
return (productFamily < productFamilyMin) || (productFamily > productFamilyMax);
|
||||||
|
}
|
||||||
|
};
|
||||||
|
|
||||||
struct MatchAny {
|
struct MatchAny {
|
||||||
template <PRODUCT_FAMILY productFamily>
|
template <PRODUCT_FAMILY productFamily>
|
||||||
static constexpr bool isMatched() { return true; }
|
static constexpr bool isMatched() { return true; }
|
||||||
|
|
Loading…
Reference in New Issue