How to dynamically change schedule based on graph topology

I want to do some optimizations which need to change schedules based on graph topology, and the schedule may of one op may want to “compute at” another op. It is easy to do this on tvm, but how to do it if I only have a pretrained, say, onnx model? I dont want to merge a bunch of ops to be a new op. Any other ideas about this? Thanks!.