File: test_dot_doubleref.patch

package info (click to toggle)
libgpuarray 0.7.6-5
  • links: PTS, VCS
  • area: main
  • in suites: bullseye
  • size: 2,784 kB
  • sloc: ansic: 19,235; python: 4,621; makefile: 213; sh: 9
file content (24 lines) | stat: -rw-r--r-- 787 bytes parent folder | download | duplicates (2)
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
Description: Fix intermittent test_dot failure

test_dot sometimes fails with a slightly out-of-tolerance result,
and comparing to the double precision result suggests most of the
rounding error is in the CPU sdot used as a reference,
not libgpuarray's result.

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Forwarded: https://github.com/Theano/libgpuarray/pull/584

--- a/pygpu/tests/test_blas.py
+++ b/pygpu/tests/test_blas.py
@@ -37,10 +37,7 @@ def dot(N, dtype, offseted_i, sliced, ov
     else:
         gZ = None
 
-    if dtype == 'float32':
-        cr = fblas.sdot(cX, cY)
-    else:
-        cr = fblas.ddot(cX, cY)
+    cr = fblas.ddot(cX, cY)
     gr = gblas.dot(gX, gY, gZ, overwrite_z=overwrite)
     numpy.testing.assert_allclose(cr, numpy.asarray(gr), rtol=1e-6)