def _common_reduce_window(operand, init_val, reducer, window_dimensions, window_strides, padding, base_dilation, window_dilation, _in_avals, _out_aval):
    o_spec = tf.TensorSpec((), dtype=operand.dtype)
    reducer_fn = tf.function(reducer, autograph=False).get_concrete_function(o_spec, o_spec)
    if (not isinstance(init_val, tf.Tensor)):
        assert ((not config.jax_enable_checks) or _is_tfval(init_val)), f'Non TfVal: {init_val}'
        init_val = tf.constant(init_val, operand.dtype)
    out = tfxla.reduce_window(operand, init_val, reducer_fn, window_dimensions, window_strides, base_dilations=base_dilation, window_dilations=window_dilation, padding=padding)
    out.set_shape(_aval_to_tf_shape(_out_aval))
    return out
def _common_reduce_window(operand, init_val, reducer, window_dimensions, window_strides, padding, base_dilation, window_dilation, _in_avals, _out_aval):
    o_spec = tf.TensorSpec((), dtype=operand.dtype)
    reducer_fn = tf.function(reducer, autograph=False).get_concrete_function(o_spec, o_spec)
    if (not isinstance(init_val, tf.Tensor)):
        assert ((not config.jax_enable_checks) or _is_tfval(init_val)), f'Non TfVal: {init_val}'
        init_val = tf.constant(init_val, operand.dtype)
    out = tfxla.reduce_window(operand, init_val, reducer_fn, window_dimensions, window_strides, base_dilations=base_dilation, window_dilations=window_dilation, padding=padding)
    out.set_shape(_aval_to_tf_shape(_out_aval))
    return out