mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
merge e2e with distributed pipeline (#6443)
merge e2e with distributed pipeline
This commit is contained in:
parent
c84bb9df9f
commit
00afd00059
5 changed files with 19 additions and 68 deletions
|
|
@ -21,7 +21,7 @@ def _single_run(execution_file, scenario, checkopint_dir = None):
|
|||
|
||||
def _distributed_run(execution_file, scenario, checkopint_dir = None):
|
||||
ngpus = torch.cuda.device_count()
|
||||
cmd = ['mpirun', '-n', str(ngpus), '-x', 'NCCL_DEBUG=INFO', '--tag-output', sys.executable, execution_file]
|
||||
cmd = ['mpirun', '-n', str(ngpus), '--tag-output', sys.executable, execution_file]
|
||||
if scenario:
|
||||
cmd += ['--scenario', scenario]
|
||||
if checkopint_dir:
|
||||
|
|
|
|||
|
|
@ -159,12 +159,6 @@ def parse_arguments():
|
|||
"--enable_memory_profile", action='store_true', help="Enable memory profile in ORT.")
|
||||
parser.add_argument(
|
||||
"--enable_training", action='store_true', help="Enable training in ORT.")
|
||||
parser.add_argument(
|
||||
"--enable_training_python_frontend_e2e_tests", action="store_true",
|
||||
help="Enable the pytorch frontend training tests.")
|
||||
parser.add_argument(
|
||||
"--enable_training_pipeline_e2e_tests", action="store_true",
|
||||
help="Enable the pipeline c++ e2e tests.")
|
||||
parser.add_argument(
|
||||
"--disable_nccl", action='store_true', help="Disable Nccl.")
|
||||
parser.add_argument(
|
||||
|
|
|
|||
|
|
@ -1,9 +1,9 @@
|
|||
trigger: none
|
||||
|
||||
jobs:
|
||||
- job: Orttraining_Linux_GPU_Training_E2E_Test_Nightly
|
||||
- job: Orttraining_Linux_GPU_Distributed_E2E_Test
|
||||
|
||||
timeoutInMinutes: 120
|
||||
timeoutInMinutes: 180
|
||||
pool: 'Linux-Multi-GPU-V100-E2E3'
|
||||
|
||||
steps:
|
||||
|
|
@ -21,8 +21,6 @@ jobs:
|
|||
--enable_training \
|
||||
--update --build \
|
||||
--build_wheel \
|
||||
--enable_training_python_frontend_e2e_tests \
|
||||
--enable_training_pipeline_e2e_tests \
|
||||
" \
|
||||
-m
|
||||
DisplayName: 'Build'
|
||||
|
|
@ -39,6 +37,21 @@ jobs:
|
|||
displayName: 'Map test data'
|
||||
condition: succeededOrFailed() # ensure all tests are run
|
||||
|
||||
- script: |
|
||||
docker run \
|
||||
--gpus all \
|
||||
--shm-size=1024m \
|
||||
--rm \
|
||||
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
||||
--volume $(Build.BinariesDirectory):/build \
|
||||
onnxruntime_e2e_test_image \
|
||||
/build/RelWithDebInfo/launch_test.py \
|
||||
--cmd_line_with_args "python orttraining_distributed_tests.py" \
|
||||
--cwd /build/RelWithDebInfo \
|
||||
displayName: 'Run orttraining_distributed_tests.py'
|
||||
condition: succeededOrFailed()
|
||||
timeoutInMinutes: 120
|
||||
|
||||
- script: |
|
||||
docker run \
|
||||
--gpus all \
|
||||
|
|
@ -300,7 +313,7 @@ jobs:
|
|||
displayName: 'Run orttraining_run_bert_pretrain.py ORTBertPretrainTest.test_pretrain_convergence'
|
||||
condition: succeededOrFailed() # ensure all tests are run
|
||||
timeoutInMinutes: 30
|
||||
|
||||
|
||||
- template: templates/component-governance-component-detection-steps.yml
|
||||
parameters:
|
||||
condition: 'succeeded'
|
||||
|
|
@ -1,44 +0,0 @@
|
|||
# 'trigger: none' to use UI to schedule the pipeline runs.
|
||||
# alternatively to schedule the pipeline run according to:
|
||||
# https://docs.microsoft.com/en-us/azure/devops/pipelines/process/scheduled-triggers?view=azure-devops&tabs=yaml
|
||||
trigger: none
|
||||
|
||||
jobs:
|
||||
- job: Onnxruntime_Linux_GPU_Training_FrontEnd
|
||||
|
||||
timeoutInMinutes: 300
|
||||
|
||||
steps:
|
||||
- checkout: self
|
||||
clean: true
|
||||
submodules: recursive
|
||||
|
||||
- template: templates/set-test-data-variables-step.yml
|
||||
|
||||
- task: CmdLine@2
|
||||
displayName: 'Clean untagged docker images'
|
||||
inputs:
|
||||
script: |
|
||||
docker rm $(docker ps -a | grep Exited | awk '{print $1;}') || true
|
||||
docker container prune -f
|
||||
docker image prune -f
|
||||
workingDirectory: $(Build.BinariesDirectory)
|
||||
continueOnError: true
|
||||
condition: always()
|
||||
|
||||
- template: templates/run-docker-build-steps.yml
|
||||
parameters:
|
||||
RunDockerBuildArgs: >
|
||||
-o ubuntu16.04 -d gpu -r $(Build.BinariesDirectory)
|
||||
-x "
|
||||
--enable_training
|
||||
--config RelWithDebInfo
|
||||
--skip_onnx_tests
|
||||
--build_wheel
|
||||
--enable_training_python_frontend_e2e_tests
|
||||
--enable_training_pipeline_e2e_tests
|
||||
"
|
||||
-m
|
||||
DisplayName: 'Build and run frontend tests'
|
||||
|
||||
- template: templates/clean-agent-build-directory-step.yml
|
||||
|
|
@ -131,8 +131,6 @@ fi
|
|||
|
||||
if [ $BUILD_DEVICE = "cpu" ] || [ $BUILD_DEVICE = "openvino" ] || [ $BUILD_DEVICE = "nnapi" ] || [ $BUILD_DEVICE = "arm" ]; then
|
||||
RUNTIME=
|
||||
elif [[ $BUILD_EXTR_PAR = *--enable_training_python_frontend_e2e_tests* ]]; then
|
||||
RUNTIME="--gpus all --shm-size=1024m"
|
||||
else
|
||||
RUNTIME="--gpus all"
|
||||
fi
|
||||
|
|
@ -147,16 +145,6 @@ if [ $BUILD_DEVICE = "openvino" ] && [[ $BUILD_EXTR_PAR == *"--use_openvino GPU_
|
|||
DOCKER_RUN_PARAMETER="$DOCKER_RUN_PARAMETER --device /dev/dri:/dev/dri"
|
||||
fi
|
||||
|
||||
if [[ $BUILD_EXTR_PAR = *--enable_training_python_frontend_e2e_tests* ]]; then
|
||||
DOCKER_RUN_PARAMETER="$DOCKER_RUN_PARAMETER --volume /bert_data/hf_data:/bert_data/hf_data"
|
||||
# DOCKER_RUN_PARAMETER="$DOCKER_RUN_PARAMETER -u0"
|
||||
fi
|
||||
|
||||
if [[ $BUILD_EXTR_PAR = *--enable_training_pipeline_e2e_tests* ]]; then
|
||||
DOCKER_RUN_PARAMETER="$DOCKER_RUN_PARAMETER --volume /bert_ort:/bert_ort \
|
||||
--volume /bert_data:/bert_data"
|
||||
fi
|
||||
|
||||
$DOCKER_CMD rm -f "onnxruntime-$BUILD_DEVICE" || true
|
||||
$DOCKER_CMD run $RUNTIME -h $HOSTNAME $DOCKER_RUN_PARAMETER \
|
||||
-e NIGHTLY_BUILD \
|
||||
|
|
|
|||
Loading…
Reference in a new issue