Only register rocm_aiter_ops if aiter is found (#28428)

Signed-off-by: mgoin <mgoin64@gmail.com>
(cherry picked from commit f2d9ad0620)
This commit is contained in:
Michael Goin
2025-11-10 19:53:24 -07:00
committed by Kevin H. Luu
parent ab625ba2fc
commit 2a21f3e7c2

View File

@@ -938,4 +938,5 @@ class rocm_aiter_ops:
return tuple(shuffle_weight(tensor, layout=layout) for tensor in tensors)
rocm_aiter_ops.register_ops_once()
if IS_AITER_FOUND:
rocm_aiter_ops.register_ops_once()