mirror of
https://github.com/amd/blis.git
synced 2026-05-13 18:52:14 +00:00
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:
@@ -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
|
||||
{
|
||||
|
||||
Reference in New Issue
Block a user