Skip to content

Stamp system-info outputs with the automations repo git version #2455

Stamp system-info outputs with the automations repo git version

Stamp system-info outputs with the automations repo git version #2455

name: MLPerf Automotive POC Test
on:
pull_request:
branches: [ "main", "dev" ]
paths:
- '.github/workflows/test-mlperf-inference-abtf-poc.yml'
- 'automation/script/**'
- 'script/run-mlperf-automotive-app/**'
- 'script/app-mlperf-automotive/**'
- 'script/app-mlperf-automotive-mlcommons-python/**'
- 'script/get-mlperf-automotive-src/**'
- 'script/get-mlperf-automotive-utils/**'
- 'script/get-ml-model-abtf-ssd-pytorch/**'
- 'script/get-dataset-cognata-mlcommons/**'
- 'script/get-mlperf-inference-sut-description/**'
- 'script/get-mlperf-inference-results-dir/**'
- 'script/get-git-repo/**'
- 'script/get-gcc/**'
- 'script/get-llvm/**'
- 'script/get-generic-sys-util/**'
- 'script/get-cache-dir/**'
- 'script/detect-sudo/**'
schedule:
- cron: '0 0 * * 0'
workflow_dispatch: {}
jobs:
build:
name: Test MLPerf Inference ABTF POC
runs-on: ${{ matrix.os }}
strategy:
fail-fast: false
matrix:
os: [ubuntu-24.04, ubuntu-latest, macos-latest, macos-15, windows-latest]
python-version: [ "3.14" ]
backend: [ "pytorch" ]
implementation: [ "python" ]
docker: [ "", "docker" ]
extra-args: [ "--adr.compiler.tags=gcc", "--env.MLC_MLPERF_LOADGEN_BUILD_FROM_SRC=off" ]
exclude:
- os: windows-latest
extra-args: "--adr.compiler.tags=gcc"
- os: windows-latest
docker: "docker"
# windows docker image is not supported in MLC yet
- os: macos-latest
docker: "docker"
- os: macos-15
docker: "docker"
steps:
- uses: actions/checkout@v3
- name: Set up Python ${{ matrix.python-version }}
uses: actions/setup-python@v3
with:
python-version: ${{ matrix.python-version }}
- name: Configure git longpaths (Windows)
if: matrix.os == 'windows-latest'
run: |
git config --system core.longpaths true
- name: Install mlcflow
run: |
pip install mlcflow
pip install tabulate
- name: Pull MLOps repository
env:
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.html_url || format('{0}/{1}', github.server_url, github.repository) }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref || github.ref_name }}
shell: bash
run: |
mlc pull repo "$PR_HEAD_REPO" --branch="$PR_HEAD_REF"
#cm pull repo mlcommons@cm4abtf --branch=poc
- name: Install Docker on macos
if: runner.os == 'macOS-deactivated'
run: |
brew update
brew install --cask docker
- name: Start Docker Daemon on macos
if: runner.os == 'macOS-deactivated'
run: |
open /Applications/Docker.app
echo "Starting Docker, this may take a while..."
# Set max attempts and initial wait time
MAX_ATTEMPTS=20
WAIT_TIME=5
# Loop until Docker daemon is up or max attempts reached
attempt=1
while ! docker info > /dev/null 2>&1; do
echo "Attempt $attempt: Waiting for Docker to start..."
sleep $WAIT_TIME
attempt=$((attempt + 1))
WAIT_TIME=$((WAIT_TIME * 2)) # Exponential backoff
if [ $attempt -gt $MAX_ATTEMPTS ]; then
echo "Docker failed to start within the timeout period"
exit 1
fi
done
echo "Docker is up and running"
- name: Install Docker Desktop on Windows
if: runner.os == 'Windows-deactivated'
run: |
choco install docker-desktop --no-progress -y
- name: Start Docker Desktop on Windows
if: runner.os == 'Windows-deactivated'
run: |
Start-Process 'C:\Program Files\Docker\Docker\Docker Desktop.exe'
# Wait until Docker daemon is running
$retryCount = 0
while (!(docker info) -and ($retryCount -lt 10)) {
Write-Output "Waiting for Docker to start..."
Start-Sleep -Seconds 10
$retryCount++
}
if ($retryCount -ge 10) {
throw "Docker failed to start"
}
Write-Output "Docker is up and running"
- name: Test MLPerf Inference ABTF POC using ${{ matrix.backend }} on ${{ matrix.os }}
shell: bash
env:
PR_HEAD_REPO: ${{ github.event.pull_request.head.repo.html_url || format('{0}/{1}', github.server_url, github.repository) }}
PR_HEAD_REF: ${{ github.event.pull_request.head.ref || github.ref_name }}
MATRIX_DOCKER: ${{ matrix.docker }}
MATRIX_EXTRA_ARGS: ${{ matrix.extra-args }}
run: |
if [ "$MATRIX_DOCKER" == "docker" ]; then
docker_flags=" --docker --docker_mlc_repo=$PR_HEAD_REPO --docker_mlc_repo_branch=$PR_HEAD_REF --docker_dt"
else
docker_flags=""
fi
mlcr run-abtf,inference,_poc-demo --test_query_count=2 --quiet $MATRIX_EXTRA_ARGS $docker_flags -v