from torch import Tensor
from torch.types import _dtype, _int, Device

# Defined in torch/csrc/acc/Module.cpp
class PrivateUse1Hooks:
    def has_primary_context(self, device_index: _int) -> bool: ...
    def is_built(self) -> bool: ...
    def is_avaible(self) -> bool: ...

class DeviceGuard:
    def type_(self) -> Device: ...

def register_python_privateuseone_device_guard(guard: DeviceGuard) -> bool: ...
def register_python_privateuseone_hook(hook: PrivateUse1Hooks) -> bool: ...
def create_empty_tensor(shape: tuple[_int, ...], dtype: _dtype) -> Tensor: ...
