File: 877316_gemm_workaround.patch

package info (click to toggle)
libgpuarray 0.7.6-13
  • links: PTS, VCS
  • area: main
  • in suites: bookworm
  • size: 3,176 kB
  • sloc: ansic: 19,235; python: 4,591; makefile: 208; javascript: 71; sh: 15
file content (39 lines) | stat: -rw-r--r-- 1,277 bytes parent folder | download
1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
32
33
34
35
36
37
38
39
Description: Allow running the tests on beignet-opencl-icd

The gemm tests crash (not just fail) on beignet due to the linked
clblas bug.

Author: Rebecca N. Palmer <rebecca_palmer@zoho.com>
Bug-Debian: https://bugs.debian.org/877316
Forwarded: not-needed

--- a/pygpu/tests/test_blas.py
+++ b/pygpu/tests/test_blas.py
@@ -28,6 +28,11 @@ def guard_devsup_blasdouble(func):
             raise
     return f
 
+def require_double_support(msg='clblas gemm - https://bugs.debian.org/877316'):
+    try:
+        a = gen_gpuarray((3,), 'float64', sliced=2, ctx=context)
+    except UnsupportedException:
+        pytest.skip('double precision not supported, and is required for ' + msg)
 
 def test_dot():
     bools = [True, False]
@@ -122,6 +127,7 @@ def test_gemm():
 @guard_devsup_blasdouble
 def gemm(m, n, k, dtype, order, trans, offseted_o, sliced, overwrite,
          init_res, alpha=1.0, beta=0.0):
+    require_double_support()
     if trans[0]:
         shpA = (k, m)
     else:
@@ -205,6 +211,7 @@ def test_rgemmBatch_3d():
 @guard_devsup_blasdouble
 def rgemmBatch_3d(b, m, n, k, dtype, order, trans, offseted_o, sliced,
                   overwrite, init_res, alpha=1.0, beta=0.0):
+    require_double_support()
     if trans[0]:
         shpA = (b, k, m)
     else: