Commit e23c788a authored by Pierre Paleo's avatar Pierre Paleo
Browse files

Do a conditional import in CudaProcessing

Will this test finally pass ?
parent 13eb2ed7
Pipeline #26956 failed with stages
in 55 seconds
import numpy as np
from .utils import get_cuda_context
import pycuda.driver as cuda
import pycuda.gpuarray as garray
dev_attrs = cuda.device_attribute
from .utils import get_cuda_context, __has_pycuda__
if __has_pycuda__:
import pycuda.driver as cuda
import pycuda.gpuarray as garray
dev_attrs = cuda.device_attribute
# NB: we must detach from a context before creating another context
class CudaProcessing(object):
......
......@@ -2,12 +2,12 @@ import numpy as np
from .double_flatfield import DoubleFlatField
from ..utils import check_shape
from ..cuda.utils import get_cuda_context, __has_pycuda__
from ..cuda.processing import CudaProcessing
from ..misc.unsharp_cuda import CudaUnsharpMask
if __has_pycuda__:
import pycuda.gpuarray as garray
import pycuda.cumath as cumath
from ..cuda.processing import CudaProcessing
from ..misc.unsharp_cuda import CudaUnsharpMask
class CudaDoubleFlatField(DoubleFlatField, CudaProcessing):
......
Supports Markdown
0% or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment