[Misc] Add @cache_once to is_arch_support_pdl in jit_kernel (#22724)

This commit is contained in:
Lianmin Zheng
2026-04-13 14:42:49 -07:00
committed by GitHub
parent b441317aa4
commit f81b6e8f51
+2 -1
View File
@@ -52,7 +52,7 @@ def cache_once(fn: F) -> F:
@functools.wraps(fn)
def wrapper(*args, **kwargs):
key = (args, tuple(sorted(kwargs.items(), key=lambda x: x[0])))
key = (args, tuple(sorted(kwargs.items())))
if key not in result_map:
result_map[key] = fn(*args, **kwargs)
return result_map[key]
@@ -305,6 +305,7 @@ def get_jit_cuda_arch() -> ArchInfo:
return _CUDA_ARCH
@cache_once
def is_arch_support_pdl() -> bool:
if is_hip_runtime():
return False