提交 b6949530 authored 作者: Frédéric Bastien's avatar Frédéric Bastien 提交者: GitHub

Merge pull request #5146 from f0k/gpusolve-opt-check-cula

Insert GpuSolve only when CULA is available
...@@ -49,7 +49,7 @@ from theano.sandbox.cuda.blas import ( ...@@ -49,7 +49,7 @@ from theano.sandbox.cuda.blas import (
GpuCorr3dMM, GpuCorr3dMM_gradInputs, GpuCorr3dMM_gradWeights) GpuCorr3dMM, GpuCorr3dMM_gradInputs, GpuCorr3dMM_gradWeights)
from theano.sandbox.cuda.blas import gpu_gemv_inplace from theano.sandbox.cuda.blas import gpu_gemv_inplace
from theano.sandbox.cuda.cula import gpu_solve from theano.sandbox.cuda.cula import gpu_solve, cula_available
from theano.sandbox.cuda.blas import gpu_gemv_no_inplace from theano.sandbox.cuda.blas import gpu_gemv_no_inplace
from theano.sandbox.cuda.blas import gpu_ger_inplace from theano.sandbox.cuda.blas import gpu_ger_inplace
...@@ -706,6 +706,8 @@ def local_gpu_solve(node): ...@@ -706,6 +706,8 @@ def local_gpu_solve(node):
CpuSolve(host_from_gpu) -> host_from_gpu(GpuSolve) CpuSolve(host_from_gpu) -> host_from_gpu(GpuSolve)
""" """
if not cula_available:
return
if node.outputs[0].dtype != 'float32': if node.outputs[0].dtype != 'float32':
return return
if isinstance(node.op, GpuFromHost): if isinstance(node.op, GpuFromHost):
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论