The service user is not {MindIO-install-user}, HwHiAiUser, or hwMindX, but it is determined based on the actual situation.
cd {DeepSpeed_installation_directory}/runtime
vim engine.py
import mindio_acp
optim_checkpoint = torch.load(optim_load_path,
map_location=torch.device('cpu'))
After:
optim_checkpoint = mindio_acp.load(optim_load_path, map_location='cpu')
torch.save(state, save_path)
After:
mindio_acp.save(state, save_path)
with open(self._get_optimizer_ckpt_name(save_dir, tag, expp_rank), 'wb') as fd:
torch.save(optimizer_state, fd)
fd.flush()
After:
mindio_acp.save(optimizer_state, self._get_optimizer_ckpt_name(save_dir, tag, expp_rank))
Before:
expert_state_dict = torch.load(DeepSpeedEngine._get_expert_ckpt_name(
checkpoint_path,
-1, # -1 means ignore layer_id
global_expert_id,
tag,
mpu),
map_location=torch.device('cpu'))
After:
expert_state_dict = mindio_acp.load(DeepSpeedEngine._get_expert_ckpt_name(
checkpoint_path,
-1, # -1 means ignore layer_id
global_expert_id,
tag,
mpu),
map_location='cpu')