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
Loading
Please sign in to comment