Skip to content

Commit

Permalink
Work around vdot not being implemented in pypy
Browse files Browse the repository at this point in the history
  • Loading branch information
inducer committed Nov 20, 2015
1 parent 5d54e91 commit 425ca5e
Showing 1 changed file with 11 additions and 1 deletion.
12 changes: 11 additions & 1 deletion test/test_algorithm.py
Expand Up @@ -346,7 +346,17 @@ def test_dot(ctx_factory):

assert abs(dot_ab_gpu - dot_ab) / abs(dot_ab) < 1e-4

vdot_ab = np.vdot(a, b)
try:
vdot_ab = np.vdot(a, b)
except NotImplementedError:
import sys
is_pypy = '__pypy__' in sys.builtin_module_names
if is_pypy:
print("PYPY: VDOT UNIMPLEMENTED")
continue
else:
raise

vdot_ab_gpu = cl_array.vdot(a_gpu, b_gpu).get()

assert abs(vdot_ab_gpu - vdot_ab) / abs(vdot_ab) < 1e-4
Expand Down

0 comments on commit 425ca5e

Please sign in to comment.