Set of ops for a backend to register

Hi,
I have a query on the set of ops that a backend must register with PyTorch 2.0. As per IRs — PyTorch master documentation, PyTorch 2.0 offers two set of IRs for backends to interface with: Core Aten IR and Prims IR.
The Core Aten IR is fully functional and doesn’t have inplace or _out variations. However, does PyTorch 2.0 decompose torch ops into the Core Aten IR ops only when a python frame is passed via torch.compile? If the execution is not via torch.compile, or if torch.compile falls back to eager mode of execution, is there a way for the backends to still get only Core Aten IR ops? If this isn’t possible, then should a backend register other ops outside of Core Aten IR, including inplace and _out variations, to support eager execution?
Regards,
Sujoy

1 Like