GitHub

Original file line numberDiff line numberDiff line change

@@ -43,6 +43,9 @@ namespace cuda

4343

T *d_r = r.ptr;

4444

const T *d_i = in.ptr;

4545
46+

const T one = scalar<T>(1);

47+

const T zero = scalar<T>(0);

48+
4649

if(oz < r.dims[2] && ow < r.dims[3]) {

4750

d_i = d_i + oz * in.strides[2] + ow * in.strides[3];

4851

d_r = d_r + oz * r.strides[2] + ow * r.strides[3];

@@ -56,9 +59,10 @@ namespace cuda

5659

bool cond = is_upper ? (oy >= ox) : (oy <= ox);

5760

bool do_unit_diag = is_unit_diag && (ox == oy);

5861

if(cond) {

59-

Yd_r[ox] = do_unit_diag ? scalar<T>(1) : Yd_i[ox];

62+

// Change made because of compute 53 failing tests

63+

Yd_r[ox] = do_unit_diag ? one : Yd_i[ox];

6064

} else {

61-

Yd_r[ox] = scalar<T>(0);

65+

Yd_r[ox] = zero;

6266

}

6367

}

6468

}

Read the original on github.com ↗