When is DispatchStub called

I am trying to create a new backend and on tensor creation with a new device type I am getting error: DispatchStub: unsupported device

How is DispatchStub called?

It’s going to be hard to answer this question without some code. Could you post it somewhere?

Using my psychic debugging skills, I am guessing that what is happening is that you’re hitting some preexisting code that is registered to work for all backends, which is attempting to a redispatch in DispatchStub. Since you probably have not registered a real implementation to DispatchStub, it is saying the device is unsupported.

However, what the right solution for this is, depends a lot on what you are actually trying to do.

I figured what I was missing, thanks :slight_smile: