mirror of
https://github.com/sgjzfzzf/triton-tvm-ffi.git
synced 2026-07-01 08:51:56 +08:00
@@ -0,0 +1,20 @@
|
||||
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
|
||||
Reference in New Issue
Block a user