Skip to content

is_initialized

torch.tvarant.is_initialized()  bool

Returns whether lazy device initialization has completed.

Return whether lazy device initialization has completed.

Returns:

Name Type Description
bool bool

True after the first device API call that triggers init.

Source code in torch_tvarant/tvarant/__init__.py
54
55
56
57
58
59
60
def is_initialized() -> bool:
    """Return whether lazy device initialization has completed.

    Returns:
        bool: ``True`` after the first device API call that triggers init.
    """
    return _initialized