Torch.cuda.device_count() shows only one gpu in MIG setting

This is expected behavior, as MIG doesn’t support multiple compute instances subscription for processes.
If no GPUs are in MIG mode, all devices should be visible. Otherwise, if one of the devices is in MIG mode, the GPUs in non-MIG are invisible.