Question about the necessity of some guards in Dynamo

Uh, that makes sense.

If I understand correctly:

backend check is used for:

opt_f1 = torch.compile(f, backend=backend1)
opt_f2 = torch.compile(f, backend=backend2)

___guarded_code.valid can be used for torch._dynamo.reset().

Right?

These senarios rarely happen in normal workflow, though.