diff --git a/docs/get_started/model_optimization.md b/docs/get_started/model_optimization.md index dfd1b93c02a489d9fd492bb1eff8e846f665d2d3..4519680a9710e12ac991a94b9ae4eebee1ef67bd 100644 --- a/docs/get_started/model_optimization.md +++ b/docs/get_started/model_optimization.md @@ -168,6 +168,7 @@ mmsegmentation==0.30.0 ninja ``` 通过pip install -r requirements.txt进行安装。 + 2. mmcv三方库安装,目前1.7.2版本支持npu,需要手动下载代码,进行源码编译安装: ```python git clone -b 1.x https://github.com/open-mmlab/mmcv.git diff --git a/model_examples/CenterPoint/README.md b/model_examples/CenterPoint/README.md index 2c7e1f1af219eaf2d046db56d6b6604877ce477e..66f81b18d1dede341a7206ed9ef741d03dcaad5b 100644 --- a/model_examples/CenterPoint/README.md +++ b/model_examples/CenterPoint/README.md @@ -140,21 +140,7 @@ python -c "import cumm" python -c "import spconv" ``` -#### 2.4 编译安装pytorch-scatter -执行以下命令编译安装pytorch-scatter -```shell -git clone https://github.com/rusty1s/pytorch_scatter.git -b 2.1.1 -cd ./pytorch_scatter/ -python setup.py bdist_wheel -cd ../ && pip install pytorch_scatter/dist/torch_scatter-*.whl -``` - -【注意】安装完毕后建议运行以下命令,如无报错,证明安装无误,可继续安装流程 -```shell -python -c "import torch_scatter" -``` - -#### 2.5 编译安装Driving SDK +#### 2.4 编译安装Driving SDK 参考Driving SDK官方gitee仓README安装编译构建并安装Driving SDK包:[参考链接](https://gitee.com/ascend/DrivingSDK) 【注意】安装完毕后建议运行以下命令,如无报错,证明安装无误,可继续安装流程 @@ -162,7 +148,7 @@ python -c "import torch_scatter" python -c "import mx_driving" ``` -#### 2.6 编译安装OpenPCDet +#### 2.5 编译安装OpenPCDet 执行以下命令,应用过patch的模型根目录编译安装OpenPCDet ```shell cd ./OpenPCDet/ @@ -328,7 +314,7 @@ python -c "import cumm" python -c "import spconv" ``` -#### 2.5 编译安装Driving SDK +#### 2.4 编译安装Driving SDK 参考Driving SDK官方gitee仓README安装编译构建并安装Driving SDK包:[参考链接](https://gitee.com/ascend/DrivingSDK) 【注意】安装完毕后建议运行以下命令,如无报错,证明安装无误,可继续安装流程 @@ -336,14 +322,14 @@ python -c "import cumm" python -c "import mx_driving" ``` -#### 2.6 编译安装OpenPCDet +#### 2.5 编译安装OpenPCDet 在应用过patch文件模型根目录,执行以下命令,编译安装OpenPCDet ```shell cd ./OpenPCDet/ python setup.py develop ``` -#### 2.7 高性能内存库替换 +#### 2.6 高性能内存库替换 参考昇腾官方指导文档,下载高性能内存库并导入环境变量[参考链接](https://www.hiascend.com/document/detail/zh/Pytorch/600/ptmoddevg/trainingmigrguide/performance_tuning_0067.html) ### 准备数据集 diff --git a/model_examples/CenterPoint/test/train_centerpoint3d_full_8p.sh b/model_examples/CenterPoint/test/train_centerpoint3d_full_8p.sh index 3f0d020e23a25116c55a33de455b624fa51ce156..2c9cd5fbb2f4673341a3f5e5c6fbc967192f7b56 100644 --- a/model_examples/CenterPoint/test/train_centerpoint3d_full_8p.sh +++ b/model_examples/CenterPoint/test/train_centerpoint3d_full_8p.sh @@ -73,7 +73,7 @@ nohup python -m torch.distributed.launch \ train.py \ --launcher pytorch \ --cfg_file ${cfg_file} \ - --logger_iter_interva 1 > ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 & + --logger_iter_interval 1 > ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 & wait #训练结束时间,不需要修改 diff --git a/model_examples/CenterPoint/test/train_centerpoint3d_performance_8p.sh b/model_examples/CenterPoint/test/train_centerpoint3d_performance_8p.sh index 8f85cca6b8fcfb91bf7bc9ffd9ecca6a24f68181..8708c004b1633ff48030d15a0f86928a1f2d4ed2 100644 --- a/model_examples/CenterPoint/test/train_centerpoint3d_performance_8p.sh +++ b/model_examples/CenterPoint/test/train_centerpoint3d_performance_8p.sh @@ -74,7 +74,7 @@ nohup python -m torch.distributed.launch \ --launcher pytorch \ --cfg_file ${cfg_file} \ --epochs 1 \ - --logger_iter_interva 1 > ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 & + --logger_iter_interval 1 > ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 & wait #训练结束时间,不需要修改 diff --git a/model_examples/PointPillar/test/train_pointpillar_performance_8p.sh b/model_examples/PointPillar/test/train_pointpillar_performance_8p.sh index 1feceddacb9eb86212b4a9b78a28a8385a488256..12e727e30100ec284956088c40e9ffbde0308264 100644 --- a/model_examples/PointPillar/test/train_pointpillar_performance_8p.sh +++ b/model_examples/PointPillar/test/train_pointpillar_performance_8p.sh @@ -70,7 +70,9 @@ nohup python -m torch.distributed.launch \ --rdzv_endpoint=localhost:${PORT} \ train.py \ --launcher pytorch \ - --cfg_file ${cfg_file} > ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 & + --cfg_file ${cfg_file} \ + --epochs 1 \ + --logger_iter_interval 1 > ${test_path_dir}/output/${ASCEND_DEVICE_ID}/train_${ASCEND_DEVICE_ID}.log 2>&1 & wait #训练结束时间,不需要修改