Tensorflow has the XLA compiler for targeting accelerators. In practice the integration isn't necessarily amazing right now, but the plan is to make it much better and able to generalize more easily.
Disclaimer: I work on the MLIR/XLA team.
Disclaimer: I work on the MLIR/XLA team.