[CI/Build] Enable mypy typing for remaining folders (#6268)

This commit is contained in:
Benjamin Muskalla
2024-07-10 22:15:55 +08:00
committed by GitHub
parent c38eba3046
commit b422d4961a
3 changed files with 24 additions and 23 deletions
+2 -3
View File
@@ -34,11 +34,10 @@ def get_physical_device_capability(device_id: int = 0) -> Tuple[int, int]:
def device_id_to_physical_device_id(device_id: int) -> int:
if "CUDA_VISIBLE_DEVICES" in os.environ:
device_ids = os.environ["CUDA_VISIBLE_DEVICES"].split(",")
device_ids = [int(device_id) for device_id in device_ids]
physical_device_id = device_ids[device_id]
return int(physical_device_id)
else:
physical_device_id = device_id
return physical_device_id
return device_id
class CudaPlatform(Platform):