提交 751dc281 authored 作者: Pascal Lamblin's avatar Pascal Lamblin

Fix crash when pygpu is not available

上级 86a7b75c
...@@ -10,9 +10,6 @@ from ..basic_ops import CGpuKernelBase ...@@ -10,9 +10,6 @@ from ..basic_ops import CGpuKernelBase
from ..type import GpuArrayType, get_context from ..type import GpuArrayType, get_context
from pygpu.gpuarray import dtype_to_typecode
# This is an implementation to test that CGpuKernelBase works and also # This is an implementation to test that CGpuKernelBase works and also
# to use as an example in the docs. It is not used for user graphs. # to use as an example in the docs. It is not used for user graphs.
class GpuEye(CGpuKernelBase, Op): class GpuEye(CGpuKernelBase, Op):
...@@ -56,6 +53,8 @@ class GpuEye(CGpuKernelBase, Op): ...@@ -56,6 +53,8 @@ class GpuEye(CGpuKernelBase, Op):
for i in xrange(2)] for i in xrange(2)]
def get_op_params(self): def get_op_params(self):
from pygpu.gpuarray import dtype_to_typecode
return [('TYPECODE', str(dtype_to_typecode(self.dtype)))] return [('TYPECODE', str(dtype_to_typecode(self.dtype)))]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论