提交 e3aff3f5 authored 作者: Arnaud Bergeron's avatar Arnaud Bergeron

Restore float16 priviledges for GpuAdvancedIncSubtensor1.

上级 b5008b0f
......@@ -1060,7 +1060,7 @@ def local_gpua_advanced_incsubtensor(op, context_name, inputs, outputs):
set_instead_of_inc = op.set_instead_of_inc
compute_capability = int(context.bin_id[-2])
if compute_capability >= 2 and x.ndim == 1 and y.ndim == 0 and inputs[0].dtype != 'float16':
if compute_capability >= 2 and x.ndim == 1 and y.ndim == 0:
x = x.dimshuffle(0, 'x')
y = y.dimshuffle('x', 'x')
ret = GpuAdvancedIncSubtensor1_dev20(
......
......@@ -589,7 +589,7 @@ class GpuAdvancedIncSubtensor1(Op):
Implement AdvancedIncSubtensor1 on the gpu.
"""
_f16_ok = False
_f16_ok = True
__props__ = ('inplace', 'set_instead_of_inc')
params_type = gpu_context_type
......@@ -799,7 +799,7 @@ class GpuAdvancedIncSubtensor1_dev20(GpuKernelBase, HideC,
only avail on compute capability 2.0 and more recent.
"""
_f16_ok = False
_f16_ok = True
def make_node(self, x, y, ilist):
"""
......
Markdown 格式
0%
您添加了 0 到此讨论。请谨慎行事。
请先完成此评论的编辑!
注册 或者 后发表评论