Skip to content

Commit e5b9bf5

Browse files
committed
use is_symm_mem_tensor if the API is available
stack-info: PR: #1933, branch: shunting314/stack/31
1 parent 702c884 commit e5b9bf5

File tree

1 file changed

+3
-0
lines changed

1 file changed

+3
-0
lines changed

helion/_dist_utils.py

Lines changed: 3 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -78,6 +78,9 @@ def is_symm_mem_tensor(t: Tensor, process_group_name: str | None = None) -> bool
7878
if not isinstance(t, Tensor) or not dist.is_initialized():
7979
return False
8080

81+
if hasattr(symm_mem, "is_symm_mem_tensor"):
82+
return symm_mem.is_symm_mem_tensor(t)
83+
8184
assert process_group_name is not None
8285
try:
8386
hdl = symm_mem.rendezvous(

0 commit comments

Comments
 (0)