torch.IsRegistryError
export type IsRegistryError<T> = T extends { readonly __isRegistryError: true } ? true : false;TCheck if a type is a registry error.
Examples
type MaybeError = kernel_not_registered_error<'add', 'float32', 'cpu'>;
type IsError = IsRegistryError<MaybeError>; // true
type NotError = string;
type IsNotError = IsRegistryError<NotError>; // false