from __future__ import annotations from .base import DeviceBackend class RocmBackend(DeviceBackend): name = "rocm" # HIP runtimes honor both; write both so a parent CUDA/HIP mix cannot # leave the child looking at the wrong cards. visibility_env_keys = ("HIP_VISIBLE_DEVICES", "ROCR_VISIBLE_DEVICES") torch_namespace = "cuda" # ROCm PyTorch still exposes torch.cuda flaggems_vendor = "amd" supports_cuda_graph = False supports_mm_cluster_fix = False supports_triton_hooks = True list_command = None