Commit c3d102c4 authored by Benjamin Kramer's avatar Benjamin Kramer Committed by TensorFlower Gardener
Browse files

[XLA:GPU] Add a generic trip count analysis based on HloEvaluator

This simply brute-forces the trip count by evaluating the trip count
repeatedly. This is a simple extension of the code in while_loop_simplifier.
Make while_loop_simplifier use it.

The GPU backend has a WhileTransformer, which tries to pattern match loops with
a constant trip count. This has stopped working a long time ago. Just replace
it with the common trip count finder. The longer-term goal is to move the
transformation before fusion and copy insertion so it's less fragile.

The tests that cover this are while_transformer's tests at the moment.

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