运行GPT-3模型时,出现Megatron requires CUDA的报错提示

问题现象描述

运行GPT-3模型(PyTorch)时,出现Megatron requires CUDA的报错提示。

原因分析

CUDA是GPU的驱动,在NPU环境上跑GPT-3模型,出现Megatron requires CUDA的错误提示,有以下原因:

可执行pip list | grep -i megatron_npu命令,查看当前环境是否有安装megatron_npu包。

解决措施