But why would you want to compute gradients during inference?
If your test_step() and predict() are implemented correctly, you should be able to do:
with strategy.scope():
    preds = model.predict(images)

And this should be utilizing multiple GPUs. I can confirm this from experience.
Also, the second link I provided walks you through the steps of how to simplify the process of writing training and inference loops when customizations are required.