L0Debug - Fix scratch offset calculation

- euRatio should only affect EUs offsets - not thread offsets

Resolves: NEO-7520

Signed-off-by: Mateusz Hoppe <mateusz.hoppe@intel.com>
This commit is contained in:
Mateusz Hoppe
2022-11-17 13:38:40 +00:00
committed by Compute-Runtime-Automation
parent 54db9fddb7
commit e0370d25b9
2 changed files with 10 additions and 6 deletions

View File

@@ -278,12 +278,12 @@ size_t DebugSession::getPerThreadScratchOffset(size_t ptss, EuThread::ThreadId t
const auto &hwInfoConfig = *NEO::HwInfoConfig::get(hwInfo.platform.eProductFamily);
uint32_t threadEuRatio = hwInfoConfig.getThreadEuRatioForScratch(hwInfo);
uint32_t multiplyFactor = 1;
if (threadEuRatio / numThreadsPerEu > 1) {
ptss *= threadEuRatio / numThreadsPerEu;
multiplyFactor = threadEuRatio / numThreadsPerEu;
}
auto threadOffset = (((threadId.slice * numSubslicesPerSlice + threadId.subslice) * numEuPerSubslice + threadId.eu) * numThreadsPerEu + threadId.thread) * ptss;
auto threadOffset = (((threadId.slice * numSubslicesPerSlice + threadId.subslice) * numEuPerSubslice + threadId.eu) * numThreadsPerEu * multiplyFactor + threadId.thread) * ptss;
return threadOffset;
}