@functools.partial(bool_to_int8, argnums=(0, 1))
def _select_and_scatter_add(source, operand, *, select_prim, window_dimensions, window_strides, padding, _in_avals, _out_aval):
    if (not _enable_xla):
        raise _xla_disabled_error('select_and_scatter_add')
    init_value = tf.zeros((), operand.dtype)
    select_fn = tf.function(tf_impl[select_prim], autograph=False).get_concrete_function(init_value, init_value)
    scatter_fn = _add_fn.get_concrete_function(init_value, init_value)
    out = tfxla.select_and_scatter(operand, window_dimensions, window_strides, padding, source, init_value, select_fn, scatter_fn)
    out.set_shape(_aval_to_tf_shape(_out_aval))
    return out
@functools.partial(bool_to_int8, argnums=(0, 1))
def _select_and_scatter_add(source, operand, *, select_prim, window_dimensions, window_strides, padding, _in_avals, _out_aval):
    if (not _enable_xla):
        raise _xla_disabled_error('select_and_scatter_add')
    init_value = tf.zeros((), operand.dtype)
    select_fn = tf.function(tf_impl[select_prim], autograph=False).get_concrete_function(init_value, init_value)
    scatter_fn = _add_fn.get_concrete_function(init_value, init_value)
    out = tfxla.select_and_scatter(operand, window_dimensions, window_strides, padding, source, init_value, select_fn, scatter_fn)
    out.set_shape(_aval_to_tf_shape(_out_aval))
    return out