Skip to content

rocMLIR Weekly Sync 2024-04-26 #110

rocMLIR Weekly Sync 2024-04-26

rocMLIR Weekly Sync 2024-04-26 #110

Workflow file for this run

name: rocMLIR main weekly sync
on:
#schedule:
#- cron: '10 17 * * 5'
#- cron: '*/5 * * * *'
workflow_dispatch:
pull_request:
branches: [develop]
types: [closed]
env:
REPORTS_DIR: migraphx-reports
jobs:
createPullRequest:
name: Update and create pull request
runs-on: self-hosted
steps:
- name: get_date
if: ${{ github.event_name != 'pull_request' }}
run: echo todays_date="$(date +'%Y-%m-%d')" >> $GITHUB_ENV
- name: extract_sha1
if: ${{ github.event_name != 'pull_request' }}
run: echo rocmlirsha="$(git ls-remote https://github.com/ROCm/rocMLIR.git develop | awk '{print $1}')" >> $GITHUB_ENV
- name: Checkout code
if: ${{ github.event_name != 'pull_request' }}
uses: actions/[email protected]
- name: update_file
if: ${{ github.event_name != 'pull_request' }}
run: |
sed -i "s/ROCm\/rocMLIR@[^ ]*/ROCm\/rocMLIR@${{ env.rocmlirsha }}/g" requirements.txt
cat requirements.txt
- name: Make changes to pull request
if: ${{ github.event_name != 'pull_request' }}
uses: peter-evans/[email protected]
with:
token: ${{ secrets.GITHUB_TOKEN }}
commit-message: Update rocMLIR main ${{ env.rocmlirsha }}
committer: Github <[email protected]>
author: ${{ github.actor }} <${{ github.actor }}@users.noreply.github.com>
signoff: false
branch: rocMLIR-sync-${{ env.todays_date }}
delete-branch: true
title: 'rocMLIR Weekly Sync ${{ env.todays_date }}'
body: |
Update rocMLIR version
- Updated with changes from ${{ env.todays_date }}
- Auto-generated by [create-pull-request][1]
- Update requirements.txt to rocMLIR@${{ env.rocmlirsha }}
[1]: https://github.com/peter-evans/create-pull-request
labels: |
rocMLIR
dependencies
automated
skip bot checks
draft: false
base: develop
- name: Checkout code
if: ${{ github.event_name != 'pull_request' }}
uses: actions/[email protected]
with:
ref: rocMLIR-sync-${{ env.todays_date }}
- name: Checkout utils
if: ${{ github.event_name != 'pull_request' }}
uses: actions/[email protected]
with:
repository: 'IgorMirosavljevicHTEC/migraphx-benchmark-utils'
path: migraphx-benchmark-utils
token: ${{ secrets.MIGRAPHX_BOT_TOKEN }}
ref: main
- name: Rebuild base image
if: ${{ github.event_name != 'pull_request' }}
env:
ROCM_RELEASE: '6.0.2'
ROCM_BASE: 'rocm/dev-ubuntu-20.04:6.0.2'
DOCKERIMAGE: 'rocm-migraphx:6.0.2-temp'
BUILD_NAVI: '0'
TOKEN: ${{ secrets.MIGRAPHX_BOT_TOKEN }}
run: |
cd $GITHUB_WORKSPACE/migraphx-benchmark-utils/scripts
./build_migraphx_docker.sh IgorMirosavljevicHTEC/migraphx-benchmark-utils IgorMirosavljevicHTEC/AMDMIGraphX rocMLIR-sync-${{ env.todays_date }}
- name: Build docker
if: ${{ github.event_name != 'pull_request' }}
run: >
cd $GITHUB_WORKSPACE && git fetch &&
git checkout rocMLIR-sync-${{ env.todays_date }} &&
cd $GITHUB_WORKSPACE/migraphx-benchmark-utils &&
docker build --no-cache
--build-arg BRANCH=rocMLIR-sync-${{ env.todays_date }}
--build-arg DOCKERBASE=rocm-migraphx:6.0.2-temp
--build-arg MIOPENTUNE=miopen-dbs/rocm6.0.2
--build-arg benchmark_utils_repo=IgorMirosavljevicHTEC/migraphx-benchmark-utils
-t "migraphx-rocm:6.0.2-rocMLIR"
-f dockerfiles/Daily.Dockerfile .
- name: Run extended accuracy test
if: ${{ github.event_name != 'pull_request' }}
run: >
docker run
--name MIGraphX-extended-accuracy-test
-e TZ=America/Chicago
-e TARGET=gpu
-e PYTHONPATH=/src/AMDMIGraphX/build/lib
-e USE_RBUILD=1
--device=/dev/dri
--device=/dev/kfd
--network=host
--group-add=video
-v /usr/share/migraphx/saved-models:/saved-models:ro
-v /usr/share/migraphx/new-saved-models:/new-saved-models:ro
-v $GITHUB_WORKSPACE/migraphx-benchmark-utils/scripts:/migraphx/sh:ro
-v /usr/share/migraphx/AMD/test-results:/data/test-results
--workdir /migraphx/sh
migraphx-rocm:6.0.2-rocMLIR /bin/bash -c "./build_migraphx.sh && ./accuracy_test-extended.sh"
- name: Get accuracy result
if: ${{ github.event_name != 'pull_request' }}
run: |
cd /usr/share/migraphx/AMD/test-results
echo last_extended="$(ls -td extended_accuracy* | head -1)" >> $GITHUB_ENV
echo comment_file="$(ls -td extended_accuracy* | head -1)/results.md" >> $GITHUB_ENV
- name: Checkout report's repo
if: ${{ github.event_name != 'pull_request' }}
uses: actions/[email protected]
with:
repository: IgorMirosavljevicHTEC/migraphx-reports
path: ${{ env.REPORTS_DIR }}
token: ${{ secrets.gh_token }}
- name: Push accuracy result to repo
if: ${{ github.event_name != 'pull_request' }}
run: |
cd /usr/share/migraphx/AMD/test-results
cp ${{ env.last_extended }} $GITHUB_WORKSPACE/${{ env.REPORTS_DIR }}/extended_accuracy_reports/${{ env.todays_date }}
- name: Comment Pull Request
uses: thollander/[email protected]
with:
filePath: /usr/share/migraphx/AMD/test-results/${{ env.comment_file }}
GITHUB_TOKEN: ${{ secrets.GITHUB_TOKEN }}
pr_number: ${{ env.PULL_REQUEST_NUMBER }}
- name: After merge
if: github.event.pull_request.merged == true && startsWith(github.event.pull_request.head.ref, 'rocMLIR-sync-')
run: |
echo "remove previous image"
docker tag rocm-migraphx:6.0.2-temp rocm-migraphx:6.0.2-updated