InfiniTensor/examples/distributed/README.md

583 B
Raw Blame History

分布式脚本

1. 运行pytorch模型并生成输入和标准输出可选择导出onnx

使用 --export_onnx 设置导出onnx的目录默认为当前路径 ./不使用这个flag则只进行计算和生成输入输出。

python run_pytorch.py --model gpt2  --batch_size 1  --length 1 --export_onnx ./

会在当前目录下生成输入输出文件test_inputs.npytest_results.npy,目前只支持单一输入输出。

2. 运行InfiniTensor分布式脚本

python cuda_launch.py --model "/XXX/XXX.onnx" --nproc_per_node 4