Commit 220c0f90 authored by David Majnemer's avatar David Majnemer Committed by TensorFlower Gardener
Browse files

[XLA] Simplify loop nesting in HandleConvolution

The calculation of a spatial coordinate in the kernel and activations is not
dependent on which part of the contracted dimension (input feature) we are in.

Rather than nesting the loops, the loops can be siblings:
- One loop over spatial dimensions
- One loop over the input feature group

This reduces the nesting depth which makes the code a little more readable and
might be slightly faster due work invariant in the spatial loop getting hoisted
out.

PiperOrigin-RevId: 216255839
parent b3bd7b37
Loading
Loading
Loading
Loading
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please to comment