if you want to avoid guards and do autotuning at compile-time, have no jit at runtime, consider torch.export; thats what you'd want.
in fact, @ezyang has been pushing it for some training workloads that dont want any jitting at runtime and ones that need a bunch of sharding info
torch.export: Compile-time autotuning for training without runtime JIT
By
–