fpga fixes: warp scheduler, fnmadd, fdiv, fsqrt

This commit is contained in:
Blaise Tine
2020-09-08 07:05:26 -07:00
parent 4c08929c56
commit 36ec603d17
22 changed files with 2374 additions and 2588 deletions

View File

@@ -131,9 +131,8 @@ void kernel_fmadd(void* arg) {
for (uint32_t i = 0; i < count; ++i) {
float a = src0_ptr[offset+i];
float b = src1_ptr[offset+i];
float c = a - b;
float d = a * b + c;
dst_ptr[offset+i] = d;
float c = a * b + b;
dst_ptr[offset+i] = c;
}
}
@@ -148,9 +147,8 @@ void kernel_fmsub(void* arg) {
for (uint32_t i = 0; i < count; ++i) {
float a = src0_ptr[offset+i];
float b = src1_ptr[offset+i];
float c = a - b;
float d = a * b - c;
dst_ptr[offset+i] = d;
float c = a * b - b;
dst_ptr[offset+i] = c;
}
}
@@ -165,9 +163,8 @@ void kernel_fnmadd(void* arg) {
for (uint32_t i = 0; i < count; ++i) {
float a = src0_ptr[offset+i];
float b = src1_ptr[offset+i];
float c = a - b;
float d =-a * b - c;
dst_ptr[offset+i] = d;
float c =-a * b - b;
dst_ptr[offset+i] = c;
}
}
@@ -182,9 +179,8 @@ void kernel_fnmsub(void* arg) {
for (uint32_t i = 0; i < count; ++i) {
float a = src0_ptr[offset+i];
float b = src1_ptr[offset+i];
float c = a - b;
float d =-a * b + c;
dst_ptr[offset+i] = d;
float c =-a * b + b;
dst_ptr[offset+i] = c;
}
}
@@ -199,11 +195,10 @@ void kernel_fnmadd_madd(void* arg) {
for (uint32_t i = 0; i < count; ++i) {
float a = src0_ptr[offset+i];
float b = src1_ptr[offset+i];
float c = a - b;
float d =-a * b - c;
float e = a * b + c;
float f = d + e;
dst_ptr[offset+i] = f;
float c =-a * b - b;
float d = a * b + b;
float e = c + d;
dst_ptr[offset+i] = e;
}
}