How do I add custom data load and write back through TIR?

The way to do it is using the “pragma” method of the stage. There are examples here and here.