from __future__ import annotations from typing import Type from triton.backends.nvidia.driver import CudaDriver class TVMFFIUtils(object): def __new__(cls: Type[TVMFFIUtils]) -> TVMFFIUtils: if not hasattr(cls, "instance"): cls.instance = super().__new__(cls) return cls.instance def __init__(self, *args, **kwargs) -> None: super().__init__(*args, **kwargs) class TVMFFIDriver(CudaDriver): ... del CudaDriver