提交 871a19fe authored 作者: Frederic Bastien's avatar Frederic Bastien

Don't err in OpenCL during init if no BLAS is available.

上级 9964c7f4
......@@ -97,7 +97,9 @@ def init_dev(dev, name=None):
# Initialise the blas kernels. We do this after the
# preallocation to not fragment the heap accidentally.
tmp = pygpu.empty((2, 2), dtype='float32', context=context)
pygpu.blas.gemm(0, tmp, tmp, 0, tmp, overwrite_c=True)
if dev.startswith('cuda'):
# In OpenCL, BLAS isn't always available
pygpu.blas.gemm(0, tmp, tmp, 0, tmp, overwrite_c=True)
del tmp
else:
context = init_dev.devmap[dev]
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论