xla
xla copied to clipboard
A better python API for accessing profiled instructions
A previous PR https://github.com/openxla/xla/pull/15170 adds a python binding for accessing the profiled instruction.
Actually the API previously added contains repeated logic with get_fdo_profile, which works very similar as the added get_instructions_profile. The only difference is that get_fdo_profile writes to a string.
In essense, we only need to parse the proto to Python objects, if users really want to do so.
This PR also adds a GPU test for the new API.