openxla / xla

A machine learning compiler for GPUs, CPUs, and ML accelerators
Apache License 2.0
2.39k stars 358 forks source link

[XLA] Clean up and modernize tuple_simplifier and corresponding test suite. #14253

Closed copybara-service[bot] closed 4 days ago

copybara-service[bot] commented 5 days ago

[XLA] Clean up and modernize tuple_simplifier and corresponding test suite.

This CL uses the clearer ParseAndReturnVerifiedModule throughout to specify the transformed HloModule in each test, and replaces the assertions on pointer equality (which are testing implementation details rather than public interface) with more declarative assertions about the resulting HLO semantics. Various other clean-ups and tweaks were also made to better conform to modern C++ style.