Commit 8bc3844a authored by Sanjoy Das's avatar Sanjoy Das Committed by TensorFlower Gardener
Browse files

De-flake HloProfileTest.ProfileWhileComputation

Instead of guessing that the add instruction is the hottest instruction, scrape
profiles for all instructions and pick the one we want.

Changed the hot instruction for an add to a multiply to avoid ambiguity with the
induction variable increment instruction.

Also changed c_find_if to take a non-const reference, preventing a "auto it =
c_find_if(CreateNewVector(), ...)" dangling pointer bug.  I had to fix up some
(benign looking) code that was calling c_find_if with a temporary to adapt to
this change.

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