https://github.com/plaidml/plaidml/tree/master/tile/hal
It's kind of cool to look anyway because it's a lot of value in less code than you might expect (complexity is in the layers above HAL).
If someone wanted to add support for Vulkan or something more ambitious like Qualcomm Hexagon or the RPi with QPU that would be pretty cool though.