mirror of
https://github.com/sgjzfzzf/triton-tvm-ffi.git
synced 2026-07-01 08:51:56 +08:00
db4f3a0c68
Signed-off-by: Jinjie Liu <jjliu@baai.ac.cn>
21 lines
462 B
Python
21 lines
462 B
Python
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
|