First level of dispatcher

How is the first level of tensor dispatch (sending tensors to devices/backends) decided and is this related to DispatchStub?

Related issue: When is DispatchStub called

Thanks in advance!