mirror of
https://github.com/intel/compute-runtime.git
synced 2026-01-10 15:12:56 +08:00
L0 Metrics: Fix bytes to be read to be a multiple of raw report size
If raw report size is not a multiple of OaBufferSize, then make sure the bytes to be read (by zetMetricStreamerReadData) is always a multiple of raw report size. Related-To: LOCI-3335 Signed-off-by: Joshua Santosh Ranjan <joshua.santosh.ranjan@intel.com>
This commit is contained in:
committed by
Compute-Runtime-Automation
parent
0101e80b00
commit
cf67f1aa8b
@@ -232,9 +232,9 @@ uint32_t OaMetricStreamerImp::getRequiredBufferSize(const uint32_t maxReportCoun
|
||||
DEBUG_BREAK_IF(rawReportSize == 0);
|
||||
uint32_t maxOaBufferReportCount = oaBufferSize / rawReportSize;
|
||||
|
||||
// Trim to OA buffer size if needed.
|
||||
return maxReportCount > maxOaBufferReportCount ? oaBufferSize
|
||||
: maxReportCount * rawReportSize;
|
||||
// Trim report count if needed.
|
||||
const auto reportCount = std::min(maxOaBufferReportCount, maxReportCount);
|
||||
return reportCount * rawReportSize;
|
||||
}
|
||||
|
||||
ze_result_t OaMetricGroupImp::openForDevice(Device *pDevice, zet_metric_streamer_desc_t &desc,
|
||||
|
||||
Reference in New Issue
Block a user