提交 bd594156 authored 作者: Frederic Bastien's avatar Frederic Bastien

Fix MRG with 0 output size. This fix this test:…

Fix MRG with 0 output size. This fix this test: THEANO_FLAGS=device=cuda,floatX=float32 theano-nose theano/sandbox/tests/test_rng_mrg.py:test_normal_truncation
上级 becd94f2
...@@ -271,7 +271,7 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base): ...@@ -271,7 +271,7 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base):
if (n_streams > n_elements) if (n_streams > n_elements)
n_streams = n_elements; n_streams = n_elements;
{ if (n_elements > 0){
size_t ls = 0, gs = 0; size_t ls = 0, gs = 0;
int err = GpuKernel_sched(&%(kname)s, n_streams, &ls, &gs); int err = GpuKernel_sched(&%(kname)s, n_streams, &ls, &gs);
if (err != GA_NO_ERROR) { if (err != GA_NO_ERROR) {
...@@ -303,7 +303,7 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base): ...@@ -303,7 +303,7 @@ class GPUA_mrg_uniform(GpuKernelBase, mrg_uniform_base):
""" % dict(fail=sub['fail'])) """ % dict(fail=sub['fail']))
def c_code_cache_version(self): def c_code_cache_version(self):
return (16,) return (17,)
@register_opt2([mrg_uniform], 'fast_compile') @register_opt2([mrg_uniform], 'fast_compile')
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论