This is kinda hacky, but as long as your GPU memory and utilization can handle it, couldnt you make each iteration into its own multiprocessing worker? That would send concurrent forward passes to the GPU allowing you to execute everything at once. Since this doesn’t appear to rely on the previous iteration output, it could be ran concurrently