mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-06 19:32:25 +08:00
feature: Report 128 GRF count with zetDebugGetRegisterSetProperties
Related-to: NEO-6788 Signed-off-by: Jitendra Sharma <jitendra.sharma@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
1ab0467301
commit
6596ce5097
@@ -1185,10 +1185,10 @@ void DebugSession::updateGrfRegisterSetProperties(EuThread::ThreadId thread, uin
|
|||||||
largeGrfModeEnabled = regPtr[1] & 0x6000;
|
largeGrfModeEnabled = regPtr[1] & 0x6000;
|
||||||
}
|
}
|
||||||
|
|
||||||
if (!largeGrfModeEnabled) {
|
if (largeGrfModeEnabled) {
|
||||||
for (uint32_t i = 0; i < *pCount; i++) {
|
for (uint32_t i = 0; i < *pCount; i++) {
|
||||||
if (pRegisterSetProperties[i].type == ZET_DEBUG_REGSET_TYPE_GRF_INTEL_GPU) {
|
if (pRegisterSetProperties[i].type == ZET_DEBUG_REGSET_TYPE_GRF_INTEL_GPU) {
|
||||||
pRegisterSetProperties[i].count = 128;
|
pRegisterSetProperties[i].count = 256;
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
@@ -1233,6 +1233,7 @@ ze_result_t DebugSession::getRegisterSetProperties(Device *device, uint32_t *pCo
|
|||||||
auto parseRegsetDesc = [&](const SIP::regset_desc ®setDesc, zet_debug_regset_type_intel_gpu_t regsetType) {
|
auto parseRegsetDesc = [&](const SIP::regset_desc ®setDesc, zet_debug_regset_type_intel_gpu_t regsetType) {
|
||||||
if (regsetDesc.num) {
|
if (regsetDesc.num) {
|
||||||
if (totalRegsetNum < *pCount) {
|
if (totalRegsetNum < *pCount) {
|
||||||
|
uint16_t num = (regsetType == ZET_DEBUG_REGSET_TYPE_GRF_INTEL_GPU) ? 128 : regsetDesc.num;
|
||||||
zet_debug_regset_properties_t regsetProps = {
|
zet_debug_regset_properties_t regsetProps = {
|
||||||
ZET_STRUCTURE_TYPE_DEBUG_REGSET_PROPERTIES,
|
ZET_STRUCTURE_TYPE_DEBUG_REGSET_PROPERTIES,
|
||||||
nullptr,
|
nullptr,
|
||||||
@@ -1240,7 +1241,7 @@ ze_result_t DebugSession::getRegisterSetProperties(Device *device, uint32_t *pCo
|
|||||||
0,
|
0,
|
||||||
DebugSessionImp::typeToRegsetFlags(regsetType),
|
DebugSessionImp::typeToRegsetFlags(regsetType),
|
||||||
0,
|
0,
|
||||||
regsetDesc.num,
|
num,
|
||||||
regsetDesc.bits,
|
regsetDesc.bits,
|
||||||
regsetDesc.bytes,
|
regsetDesc.bytes,
|
||||||
};
|
};
|
||||||
|
|||||||
@@ -334,6 +334,24 @@ TEST_F(DebugApiTest, givenSIPHeaderHasZeroSizeMMEThenNotExposedAsRegset) {
|
|||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
|
TEST_F(DebugApiTest, givenSIPHeaderGRFCountNotEqualTo128ThenGetRegisterSetPropertiesReturns128) {
|
||||||
|
static_cast<MockBuiltins *>(neoDevice->executionEnvironment->rootDeviceEnvironments[0]->builtins.get())->stateSaveAreaHeader =
|
||||||
|
MockSipData::createStateSaveAreaHeader(2, 256);
|
||||||
|
uint32_t count = 0;
|
||||||
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zetDebugGetRegisterSetProperties(device->toHandle(), &count, nullptr));
|
||||||
|
|
||||||
|
std::vector<zet_debug_regset_properties_t> regsetProps(count);
|
||||||
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zetDebugGetRegisterSetProperties(device->toHandle(), &count, regsetProps.data()));
|
||||||
|
ASSERT_EQ(13u, count);
|
||||||
|
|
||||||
|
for (uint32_t i = 0; i < count; i++) {
|
||||||
|
if (regsetProps[i].type == ZET_DEBUG_REGSET_TYPE_GRF_INTEL_GPU) {
|
||||||
|
EXPECT_EQ(128u, regsetProps[i].count);
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
TEST_F(DebugApiTest, givenGetRegisterSetPropertiesCalledCorrectPropertiesReturned) {
|
TEST_F(DebugApiTest, givenGetRegisterSetPropertiesCalledCorrectPropertiesReturned) {
|
||||||
uint32_t count = 0;
|
uint32_t count = 0;
|
||||||
EXPECT_EQ(ZE_RESULT_SUCCESS, zetDebugGetRegisterSetProperties(device->toHandle(), &count, nullptr));
|
EXPECT_EQ(ZE_RESULT_SUCCESS, zetDebugGetRegisterSetProperties(device->toHandle(), &count, nullptr));
|
||||||
|
|||||||
Reference in New Issue
Block a user