mirror of
https://github.com/sgjzfzzf/triton-tvm-ffi.git
synced 2026-05-02 03:52:11 +08:00
17 lines
376 B
Python
17 lines
376 B
Python
import sysconfig
|
|
from typing import List, Optional
|
|
|
|
from triton.backends.nvidia.driver import ty_to_cpp
|
|
|
|
|
|
def include_paths() -> List[str]:
|
|
pkg_path: str = sysconfig.get_path("purelib")
|
|
return [f"{pkg_path}/triton_tvm_ffi/include"]
|
|
|
|
|
|
def type_canonicalize(ty: str) -> Optional[str]:
|
|
if ty == "constexpr":
|
|
return None
|
|
else:
|
|
return ty_to_cpp(ty)
|