x86: Fixed numpy CI failure when the target is ZEN.
This commit is contained in:
parent
e1eef56e05
commit
f3cebb3ca3
|
@ -85,7 +85,7 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx){
|
|||
if (nthreads == 1) {
|
||||
#endif
|
||||
|
||||
SCAL_K(n, 0, 0, alpha, x, incx, NULL, 0, NULL, 0);
|
||||
SCAL_K(n, 0, 0, alpha, x, incx, NULL, 0, NULL, 1);
|
||||
|
||||
#ifdef SMP
|
||||
} else {
|
||||
|
@ -102,7 +102,7 @@ void CNAME(blasint n, FLOAT alpha, FLOAT *x, blasint incx){
|
|||
#else
|
||||
&alpha,
|
||||
#endif
|
||||
x, incx, NULL, 0, NULL, 0, (int (*)(void))SCAL_K, nthreads);
|
||||
x, incx, NULL, 0, NULL, 1, (int (*)(void))SCAL_K, nthreads);
|
||||
|
||||
}
|
||||
#endif
|
||||
|
|
|
@ -150,50 +150,17 @@ static void dscal_kernel_inc_8(BLASLONG n, FLOAT *alpha, FLOAT *x, BLASLONG inc_
|
|||
"%xmm12", "%xmm13", "%xmm14", "%xmm15",
|
||||
"memory"
|
||||
);
|
||||
|
||||
|
||||
}
|
||||
|
||||
int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLASLONG inc_x, FLOAT *y, BLASLONG inc_y, FLOAT *dummy, BLASLONG dummy2)
|
||||
{
|
||||
BLASLONG i = 0, j = 0;
|
||||
|
||||
// Resolved issue 4728 when the caller is dscal
|
||||
if (dummy2 == 1 && da == 0.0)
|
||||
{
|
||||
if ( inc_x != 1 )
|
||||
{
|
||||
|
||||
if ( da == 0.0 )
|
||||
{
|
||||
|
||||
BLASLONG n1 = n & -2;
|
||||
|
||||
while(j < n1)
|
||||
{
|
||||
|
||||
if (isinf(x[i])||isnan(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i]=0.0;
|
||||
if (isinf(x[i+inc_x])||isnan(x[i+inc_x]))
|
||||
x[i+inc_x]=NAN;
|
||||
else x[i+inc_x]=0.0;
|
||||
i += 2*inc_x ;
|
||||
j+=2;
|
||||
|
||||
}
|
||||
|
||||
while(j < n)
|
||||
{
|
||||
|
||||
if (isinf(x[i])||isnan(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i]=0.0;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0 )
|
||||
{
|
||||
|
@ -201,55 +168,78 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
|
|||
i = n1 * inc_x;
|
||||
j = n1;
|
||||
}
|
||||
|
||||
while(j < n)
|
||||
{
|
||||
|
||||
x[i] *= da;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
return(0);
|
||||
}
|
||||
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0 )
|
||||
{
|
||||
// if ( da == 0.0 )
|
||||
// dscal_kernel_8_zero(n1 , &da , x);
|
||||
// else
|
||||
dscal_kernel_8(n1 , &da , x);
|
||||
}
|
||||
|
||||
if ( da == 0.0 )
|
||||
{
|
||||
for ( i=n1 ; i<n; i++ )
|
||||
{
|
||||
if(isinf(x[i])||isnan(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i] = 0.0;
|
||||
}
|
||||
}
|
||||
else if (isinf(da)){
|
||||
for ( i=n1 ; i<n; i++)
|
||||
if (x[i]==0.) x[i]=NAN;
|
||||
else x[i] *=da;
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0)
|
||||
dscal_kernel_8(n1 , &da , x);
|
||||
for ( i = n1 ; i < n; i++ )
|
||||
x[i] *= da;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if(isinf(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i] *= da;
|
||||
if ( inc_x != 1 )
|
||||
{
|
||||
if( da == 0.0)
|
||||
{
|
||||
BLASLONG n1 = n & -2;
|
||||
while(j < n1)
|
||||
{
|
||||
x[i] = 0.0;
|
||||
x[i+inc_x] = 0.0;
|
||||
i += 2 * inc_x ;
|
||||
j += 2;
|
||||
}
|
||||
while(j < n)
|
||||
{
|
||||
x[i] = 0.0;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0 )
|
||||
{
|
||||
dscal_kernel_inc_8(n1, &da, x, inc_x);
|
||||
i = n1 * inc_x;
|
||||
j = n1;
|
||||
}
|
||||
while(j < n)
|
||||
{
|
||||
x[i] *= da;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( da == 0.0 )
|
||||
{
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0)
|
||||
dscal_kernel_8_zero(n1, &da, x);
|
||||
for ( i = n1 ; i < n; i++ )
|
||||
x[i] = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0)
|
||||
dscal_kernel_8(n1 , &da , x);
|
||||
for ( i = n1 ; i < n; i++ )
|
||||
x[i] *= da;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
|
@ -114,39 +114,11 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
|
|||
{
|
||||
BLASLONG i = 0, j = 0;
|
||||
|
||||
// Resolved issue 4728 when the caller is sscal
|
||||
if (dummy2 == 1 && da == 0.0)
|
||||
{
|
||||
if ( inc_x != 1 )
|
||||
{
|
||||
|
||||
if ( da == 0.0 )
|
||||
{
|
||||
BLASLONG n1 = n & -2;
|
||||
|
||||
while(j < n1)
|
||||
{
|
||||
if (isinf(x[i])||isnan(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i]=0.0;
|
||||
if (isinf(x[i+inc_x])||isnan(x[i+inc_x]))
|
||||
x[i+inc_x]=NAN;
|
||||
else x[i+inc_x]=0.0;
|
||||
i += 2*inc_x ;
|
||||
j+=2;
|
||||
|
||||
}
|
||||
|
||||
while(j < n)
|
||||
{
|
||||
if (isinf(x[i])||isnan(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i]=0.0;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
#if 1
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0 )
|
||||
{
|
||||
|
@ -154,57 +126,78 @@ int CNAME(BLASLONG n, BLASLONG dummy0, BLASLONG dummy1, FLOAT da, FLOAT *x, BLAS
|
|||
i = n1 * inc_x;
|
||||
j = n1;
|
||||
}
|
||||
#endif
|
||||
while(j < n)
|
||||
{
|
||||
x[i] *= da;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
|
||||
}
|
||||
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
BLASLONG n1 = n & -16;
|
||||
if ( n1 > 0 )
|
||||
{
|
||||
//if ( da == 0.0 )
|
||||
// sscal_kernel_16_zero(n1 , &da , x);
|
||||
//else
|
||||
sscal_kernel_16(n1 , &da , x);
|
||||
}
|
||||
|
||||
if ( da == 0.0 )
|
||||
{
|
||||
for ( i=n1 ; i<n; i++ )
|
||||
{
|
||||
if (isinf(x[i])||isnan(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i]=0.0;
|
||||
}
|
||||
}
|
||||
else if ( isinf(da) )
|
||||
{
|
||||
for ( i=n1 ; i<n; i++ )
|
||||
{
|
||||
if (x[i] == 0.0)
|
||||
x[i]=NAN;
|
||||
else x[i] *= da;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
|
||||
BLASLONG n1 = n & -16;
|
||||
if ( n1 > 0)
|
||||
sscal_kernel_16(n1 , &da , x);
|
||||
for ( i = n1 ; i < n; i++ )
|
||||
x[i] *= da;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if (isinf(x[i]))
|
||||
x[i]=NAN;
|
||||
else x[i] *= da;
|
||||
if ( inc_x != 1 )
|
||||
{
|
||||
if( da == 0.0)
|
||||
{
|
||||
BLASLONG n1 = n & -2;
|
||||
while(j < n1)
|
||||
{
|
||||
x[i] = 0.0;
|
||||
x[i+inc_x] = 0.0;
|
||||
i += 2 * inc_x ;
|
||||
j += 2;
|
||||
}
|
||||
while(j < n)
|
||||
{
|
||||
x[i] = 0.0;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
BLASLONG n1 = n & -8;
|
||||
if ( n1 > 0 )
|
||||
{
|
||||
sscal_kernel_inc_8(n1, &da, x, inc_x);
|
||||
i = n1 * inc_x;
|
||||
j = n1;
|
||||
}
|
||||
while(j < n)
|
||||
{
|
||||
x[i] *= da;
|
||||
i += inc_x ;
|
||||
j++;
|
||||
}
|
||||
}
|
||||
}
|
||||
else
|
||||
{
|
||||
if ( da == 0.0 )
|
||||
{
|
||||
BLASLONG n1 = n & -16;
|
||||
if ( n1 > 0)
|
||||
sscal_kernel_16_zero(n1, &da, x);
|
||||
for ( i = n1 ; i < n; i++ )
|
||||
x[i] = 0.0;
|
||||
}
|
||||
else
|
||||
{
|
||||
BLASLONG n1 = n & -16;
|
||||
if ( n1 > 0)
|
||||
sscal_kernel_16(n1 , &da , x);
|
||||
for ( i = n1 ; i < n; i++ )
|
||||
x[i] *= da;
|
||||
}
|
||||
}
|
||||
}
|
||||
return(0);
|
||||
}
|
||||
|
||||
|
||||
|
|
Loading…
Reference in New Issue