Merge pull request #2645 from martin-frbg/misc_fixes

Miscellaneous fixes
This commit is contained in:
Martin Kroeker 2020-06-07 19:44:50 +02:00 committed by GitHub
commit 89091e6b64
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
3 changed files with 7 additions and 1410 deletions

View File

@ -80,7 +80,7 @@ static void __inline blas_lock(volatile BLASULONG *address){
#endif
do {
while (*address) {YIELDING;};
while (*address) {YIELDING;}
#ifndef C_MSVC
__asm__ __volatile__(
@ -199,9 +199,9 @@ static __inline BLASLONG blas_quickdivide(BLASLONG x, BLASLONG y){
#else
extern unsigned int blas_quick_divide_table[];
static __inline int blas_quickdivide(unsigned int x, unsigned int y){
static __inline unsigned int blas_quickdivide(unsigned int x, unsigned int y){
unsigned int result;
volatile unsigned int result;
if (y <= 1) return x;
@ -215,7 +215,6 @@ static __inline int blas_quickdivide(unsigned int x, unsigned int y){
y = blas_quick_divide_table[y];
__asm__ __volatile__ ("mull %0" :"=d" (result), "+a"(x) : "0" (y));
return result;
}
#endif

File diff suppressed because it is too large Load Diff

View File

@ -72,12 +72,13 @@ main (int argc, char *argv[])
{
int m, n, k;
int i, j, l;
int x;
int ret = 0;
int loop = 100;
char transA = 'N', transB = 'N';
float alpha = 1.0, beta = 0.0;
for (int x = 0; x <= loop; x++)
for (x = 0; x <= loop; x++)
{
m = k = n = x;
float A[m * k];
@ -86,9 +87,9 @@ main (int argc, char *argv[])
bfloat16_bits AA[m * k], BB[k * n];
float DD[m * n], CC[m * n];
for (int j = 0; j < m; j++)
for (j = 0; j < m; j++)
{
for (int i = 0; i < m; i++)
for (i = 0; i < m; i++)
{
A[j * k + i] = ((FLOAT) rand () / (FLOAT) RAND_MAX) + 0.5;
B[j * k + i] = ((FLOAT) rand () / (FLOAT) RAND_MAX) + 0.5;