summaryrefslogtreecommitdiff
path: root/silx/opencl/convolution.py
diff options
context:
space:
mode:
Diffstat (limited to 'silx/opencl/convolution.py')
-rw-r--r--silx/opencl/convolution.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/silx/opencl/convolution.py b/silx/opencl/convolution.py
index b8dd8f6..138b985 100644
--- a/silx/opencl/convolution.py
+++ b/silx/opencl/convolution.py
@@ -94,6 +94,14 @@ class Convolution(OpenclProcessing):
self.is_cpu = (self.device.type == "CPU")
self.use_textures = not(self.extra_options["dont_use_textures"])
self.use_textures *= not(self.is_cpu)
+ # Nvidia Fermi GPUs (compute capability 2.X) do not support opencl read_imagef
+ try:
+ cc = self.ctx.devices[0].compute_capability_major_nv
+ self.use_textures *= (cc >= 3)
+ except cl.LogicError: # probably not a Nvidia GPU
+ pass
+ except AttributeError: # probably not a Nvidia GPU
+ pass
def _get_dimensions(self, shape, kernel):
self.shape = shape