Checks mutable in_params are not broadcasted in ElementwiseKernel
@@ -529,6 +529,11 @@ cdef class ElementwiseKernel:
shape = size,
is_size_specified = True
+ if any(not self.params[i].is_const and
+ not internal.vector_equal(args[i].shape, shape)
+ for i in range(self.nin)):
+ raise ValueError('Shape is mismatched')
+
out_args = _get_out_args_with_params(
out_args, out_types, shape, self.out_params, is_size_specified)
if self.no_return:
