Incorrect accumulation of results in DDOTV

- When the number of threads launched is not equal to the
  number of threads requested the garbage value in the created
  buffer will not be overwritten by valid values.
- To handle the above scenario, the created temporary buffer is
  initialized with zeroes.

AMD-Internal: [CPUPL-3268]
Change-Id: I439a1da18eb1b380491fea14f42b0ede05ccf5a9
This commit is contained in:
Harihara Sudhan S
2023-05-04 10:44:15 +05:30
parent bf26b8ffbc
commit a6621f1241

View File

@@ -452,6 +452,19 @@ double ddot_blis_impl
if ((bli_mem_is_alloc(&mem_buf_rho)))
{
rho_temp = bli_mem_buffer(&mem_buf_rho);
/*
This is done to handle cases when the
number of threads launched is not equal
to the number of threads requested. In
such cases, the garbage value in the created
buffer will not be overwritten by valid values.
This will ensure that garbage value will
not get accumulated with the final result.
*/
for (dim_t i = 0; i < nt; i++)
rho_temp[i] = 0.0;
}
else
{