In the default compilation flow the lowering from relay → te → tir is implemented using a relay operator strategy.
For a tutorial on relay operator strategies have a look at: Relay Operator Strategy — tvm 0.9.dev0 documentation
You will find the default strategies in tvm/relay/op/strategy
.