mirror of
https://github.com/saymrwulf/onnxruntime.git
synced 2026-07-29 20:14:01 +00:00
### Description <!-- Describe your changes. --> ROCm CI build step takes more than one hour. Set parallel=16 when build on ROCm CI to reduce build time. ### Motivation and Context <!-- - Why is this change required? What problem does it solve? - If it fixes an open issue, please link to the issue here. --> Co-authored-by: peixuanzuo <peixuanzuo@linmif39a000004.zvflicr54joexhdgnhvmxrxygg.phxx.internal.cloudapp.net>
88 lines
2.7 KiB
YAML
88 lines
2.7 KiB
YAML
trigger: none
|
|
|
|
name: 'linux_ci_$(Date:yyyyMMdd)_$(Rev:r)'
|
|
jobs:
|
|
- job: AMDMIGraphX_CI
|
|
workspace:
|
|
clean: all
|
|
pool: 'AMD-GPU'
|
|
timeoutInMinutes: 180
|
|
|
|
# gid of video and render group on gcr-openpai-35 and -36
|
|
variables:
|
|
- name: video
|
|
value: 44
|
|
- name: render
|
|
value: 109
|
|
- name: RocmVersion
|
|
value: 5.2.3
|
|
|
|
steps:
|
|
- checkout: self
|
|
clean: true
|
|
submodules: recursive
|
|
|
|
- template: templates/get-docker-image-steps.yml
|
|
parameters:
|
|
Dockerfile: tools/ci_build/github/pai/migraphx-ci-pipeline-env.Dockerfile
|
|
Context: tools/ci_build/github/pai
|
|
Repository: onnxruntimetrainingmigraphx-cibuild-rocm$(RocmVersion)
|
|
|
|
- task: CmdLine@2
|
|
inputs:
|
|
script: |
|
|
docker run --rm \
|
|
-e HIP_VISIBLE_DEVICES \
|
|
--privileged \
|
|
--security-opt seccomp=unconfined \
|
|
--shm-size=1024m \
|
|
--device=/dev/kfd \
|
|
--device=/dev/dri \
|
|
--group-add $(video) \
|
|
--group-add $(render) \
|
|
--user $UID:$(id -g $USER) \
|
|
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
|
--volume $(Build.BinariesDirectory):/build \
|
|
--workdir /onnxruntime_src \
|
|
onnxruntimetrainingmigraphx-cibuild-rocm$(RocmVersion) \
|
|
python tools/ci_build/build.py \
|
|
--config RelWithDebInfo \
|
|
--cmake_extra_defines \
|
|
CMAKE_HIP_COMPILER=/opt/rocm/llvm/bin/clang++ \
|
|
--mpi_home /opt/ompi \
|
|
--use_migraphx \
|
|
--rocm_version=$(RocmVersion) \
|
|
--rocm_home /opt/rocm \
|
|
--nccl_home /opt/rocm \
|
|
--update \
|
|
--build_dir /build \
|
|
--build \
|
|
--parallel 16 \
|
|
--build_wheel \
|
|
--skip_submodule_sync \
|
|
--skip_tests
|
|
workingDirectory: $(Build.SourcesDirectory)
|
|
displayName: 'Build onnxruntime'
|
|
|
|
- task: CmdLine@2
|
|
inputs:
|
|
script: |
|
|
docker run --rm \
|
|
-e HIP_VISIBLE_DEVICES \
|
|
--privileged \
|
|
--security-opt seccomp=unconfined \
|
|
--shm-size=1024m \
|
|
--device=/dev/kfd \
|
|
--device=/dev/dri \
|
|
--group-add $(video) \
|
|
--group-add $(render) \
|
|
--user $UID:$(id -g $USER) \
|
|
--volume $(Build.SourcesDirectory):/onnxruntime_src \
|
|
--volume $(Build.BinariesDirectory):/build \
|
|
--workdir /build/RelWithDebInfo \
|
|
onnxruntimetrainingmigraphx-cibuild-rocm$(RocmVersion) \
|
|
/onnxruntime_src/tools/ci_build/github/pai/migraphx_test_launcher.sh
|
|
workingDirectory: $(Build.SourcesDirectory)
|
|
displayName: 'Run onnxruntime unit tests'
|
|
|
|
- template: templates/clean-agent-build-directory-step.yml
|