I am using JAX, and I want to perform an operation like
@jax.jit
def fun(x, index):
x[:index] = other_fun(x[:index])
return x
This cannot be performed under jit. Is there a way of doing this with jax.ops or jax.lax?
I thought of using jax.ops.index_update(x, idx, y) but I cannot find a way of computing y without incurring in the same problem again.