Skip to content

Commit

Permalink
update plt start.sh, test=model
Browse files Browse the repository at this point in the history
  • Loading branch information
Zeref996 committed Aug 5, 2024
1 parent 6c092a4 commit ea94ce8
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
5 changes: 3 additions & 2 deletions framework/e2e/PaddleLT_new/start.sh
Original file line number Diff line number Diff line change
@@ -1,11 +1,12 @@
#!/usr/bin/env bash

# 最外层执行脚本
# 最外层执行脚本, 不可用于CI
test_scene=$1
source ./PTSTools/tools/set_env/set_env.sh ${PTS_ENV_VARS} # 设定PTS环境变量
source ./set_docker_env.sh # 设定docker环境相关参数

docker_name="PaddleLayerTest_${AGILE_PIPELINE_BUILD_NUMBER}"
export docker_name=${DOCKER_NAME:-PaddleLayerTest_${AGILE_PIPELINE_BUILD_NUMBER}}
docker container ls -a --filter "name=${docker_name}" --format "{{.ID}}" | xargs -r docker rm -f

nvidia-docker run --rm -i --name ${docker_name} --privileged --shm-size=128g --net=host \
-w /workspace \
Expand Down
8 changes: 6 additions & 2 deletions framework/e2e/PaddleLT_new/start_perf_a100.sh
Original file line number Diff line number Diff line change
Expand Up @@ -5,12 +5,14 @@ test_scene=$1
source ./PTSTools/tools/set_env/set_env.sh ${PTS_ENV_VARS} # 设定PTS环境变量
source ./set_docker_env.sh # 设定docker环境相关参数

docker_name="PaddleLayerTest_perf_${AGILE_PIPELINE_BUILD_NUMBER}"
export CUDA_SO="$(\ls /usr/lib64/libcuda* | xargs -I{} echo '-v {}:{}') $(\ls /usr/lib64/libnvidia* | xargs -I{} echo '-v {}:{}')"
export DEVICES="$(\ls -d /dev/nvidia* | xargs -I{} echo '-v {}:{}') $(\ls /dev/nvidia-caps/* | xargs -I{} echo '-v {}:{}')"
RUN_IMAGE_NAME=iregistry.baidu-int.com/paddlecloud/base-images:paddlecloud-ubuntu18.04-gcc8.2-cuda11.8-cudnn8.6-nccl2.15.5

if [ $PLT_PERF_CONTENT == "layer" ];then
export docker_name=${DOCKER_NAME:-PaddleLayerTest_perf_${AGILE_PIPELINE_BUILD_NUMBER}}
docker container ls -a --filter "name=${docker_name}" --format "{{.ID}}" | xargs -r docker rm -f

docker run --rm -i --name=${docker_name} --network=host --privileged -v /usr/bin/nvidia-smi:/usr/bin/nvidia-smi \
${DEVICES} ${CUDA_SO} -v ${PWD}:/workspace \
-w /workspace \
Expand Down Expand Up @@ -41,6 +43,8 @@ ${python_ver} run.py
"

elif [ $PLT_PERF_CONTENT == "kernel" ];then
export docker_name=${DOCKER_NAME:-PaddleLayerTest_perf_${AGILE_PIPELINE_BUILD_NUMBER}}
docker container ls -a --filter "name=${docker_name}" --format "{{.ID}}" | xargs -r docker rm -f

docker exec -e "PLT_DEVICE_ID=${PLT_DEVICE_ID}" \
-e "AK=${AK}" -e "SK=${SK}" \
Expand All @@ -51,7 +55,7 @@ docker exec -e "PLT_DEVICE_ID=${PLT_DEVICE_ID}" \
-e "python_ver=${python_ver}" \
-e "wheel_url=${wheel_url}" \
-e "AGILE_PIPELINE_BUILD_ID=${AGILE_PIPELINE_BUILD_ID}" \
${PLT_PERF_DOCKER_NAME} \
${docker_name} \
/bin/bash -c "
ldconfig;
ps aux | grep python | awk '{print $2}' | xargs kill -9
Expand Down

0 comments on commit ea94ce8

Please sign in to comment.