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: 0*NaN is not 0
clblas gemv skips the +beta*Y if beta is 0, but clblast gemv doesn't.
This matters if Y initially contains NaNs, which is likely if it is
uninitialized.
(My reading of the spec is that this is a bug in clblast, but I'm
not certain of that.)
Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/992673
Forwarded: no
--- a/pygpu/blas.pyx
+++ b/pygpu/blas.pyx
@@ -100,7 +100,7 @@ def gemv(double alpha, GpuArray A, GpuAr
if Y is None:
if beta != 0.0:
raise ValueError("Y not provided and beta != 0")
- Y = pygpu_empty(1, &Yshp, A.ga.typecode, GA_ANY_ORDER, A.context, None)
+ Y = pygpu_zeros(1, &Yshp, A.ga.typecode, GA_ANY_ORDER, A.context, None)
overwrite_y = True
if not overwrite_y:
|