Skip to content
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 3 additions & 0 deletions aiter/ops/triton/utils/_triton/arch_info.py
Original file line number Diff line number Diff line change
@@ -1,4 +1,5 @@
import triton
from functools import lru_cache

# For now, there is 1-to-1 correspondence between arch and device
_ARCH_TO_DEVICE = {
Expand All @@ -7,6 +8,7 @@
}


@lru_cache(maxsize=1)
def get_arch():
try:
arch = (
Expand All @@ -21,6 +23,7 @@ def get_arch():
return arch


@lru_cache(maxsize=1)
def get_device():
return _ARCH_TO_DEVICE[get_arch()]

Expand Down
Loading