0

我按照以下教程通过修改 run_classifier.py 和 optmization.py 为 bert 训练启用了多个 GPU:

https://lambdalabs.com/blog/bert-multi-gpu-implementation-using-tensorflow-and-horovod-with-code/#demo

然后我跑了:

horovodrun -np 2 \
    -H x.x.x.x:2 \
    python mgpu_run_classifier.py \
    --task_name=mz \
    --do_train=true \  

该命令运行良好,但我不确定是否真的使用了多个 gpu,可能没有,因为 nvidia-smi 显示只使用了一个 GPU,但在“顶部”输出中它确实显示了我的“mgpu_run_classifier”的 2 个实例.py”正在运行。我怀疑某处发生了一些问题。

4

0 回答 0