Skip to content
Snippets Groups Projects

Throw an error when performing GPU operations with SerialDataHandling when pycuda is not available

Merged Stephan Seitz requested to merge seitz/pystencils:pycuda-not-avaible-handler into master
2 files
+ 8
2
Compare changes
  • Side-by-side
  • Inline
Files
2
@@ -39,3 +39,9 @@ class PyCudaArrayHandler:
return self.to_gpu(cpu_array)
from_numpy = to_gpu
class PyCudaNotAvailableHandler:
def __getattribute__(self, name):
raise NotImplementedError("Unable to initiaize PyCuda! "
"Try to run `import pycuda.autoinit` to check whether PyCuda is working correctly!")
Loading