Skip to content

Commit

Permalink
merge master and resolve conflicts
Browse files Browse the repository at this point in the history
  • Loading branch information
shivadbhavsar committed May 29, 2024
2 parents 6dc309c + dc028dd commit 048bcda
Show file tree
Hide file tree
Showing 976 changed files with 22,533 additions and 12,347 deletions.
43 changes: 43 additions & 0 deletions .azuredevops/rocm-ci.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,43 @@
resources:
repositories:
- repository: pipelines_repo
type: github
endpoint: ROCm
name: ROCm/ROCm

variables:
- group: common
- template: /.azuredevops/variables-global.yml@pipelines_repo

trigger:
batch: true
branches:
include:
- develop
paths:
exclude:
- .githooks
- .github
- docs
- '.*.y*ml'
- '*.md'
- Jenkinsfile
- LICENSE

pr:
autoCancel: true
branches:
include:
- develop
paths:
exclude:
- .github
- docs
- '.*.y*ml'
- '*.md'
- Jenkinsfile
- LICENSE
drafts: false

jobs:
- template: ${{ variables.CI_COMPONENT_PATH }}/AMDMIGraphX.yml@pipelines_repo
2 changes: 1 addition & 1 deletion .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -356,7 +356,7 @@ jobs:
with:
python-version: 3.8
- name: run License Check
run: python3 tools/check_stamped.py
run: python3 tools/check_stamped.py ${GITHUB_HEAD_REF:-${GITHUB_REF#refs/heads/}}

linux:

Expand Down
29 changes: 29 additions & 0 deletions .github/workflows/config.md
Original file line number Diff line number Diff line change
@@ -0,0 +1,29 @@
#=====ROCM INFO=====
ROCM_VERSION : '6.0.2'
#default ROCm version to be used
ROCM_BASE_IMAGE : 'rocm/dev-ubuntu-20.04'
#base image from dockerhub to be used
ROCM_BUILT_IMAGE : 'rocm-migraphx'
#name of the docker image built upon ROCm base
USE_NAVI : '0'
#disable NAVI in image build
OVERWRITE_EXISTING : 'true'
#building new ROCm image overwrites old with same version

#=====REPOS INFO=====
ORGANIZATION_REPO : 'AMD'
BENCHMARK_UTILS_REPO : 'ROCm/migraphx-benchmark-utils'
PERFORMANCE_REPORTS_REPO : 'ROCm/migraphx-reports'
PERFORMANCE_BACKUP_REPO : 'migraphx-benchmark/performance-backup'

#=====PERFORMANCE SCRIPT PARAMETERS=====
RESULTS_TO_COMPARE : '10'
#number of previous performance results to be used in calculations
CALCULATION_METHOD_FLAG : '-r'
#calculation method used in reporting, -m for Max value; -s for Std dev; -r for Threshold file
PERFORMANCE_TEST_TIMEOUT : '30m'
#timeout for each model after which test is aborted

#===== W A R N I N G =====
#VARIABLE NAMES NOT TO BE CHANGED, VALUES ONLY!
#VALUES MUST BE ENGLOSED IN SINGLE QUOTES!
57 changes: 46 additions & 11 deletions .github/workflows/performance.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -5,7 +5,7 @@ on:
branches: [develop]
types: [opened, synchronize, closed]
schedule:
- cron: "0 6 * * 1-6"
- cron: "0 7 * * 1-6"

workflow_dispatch:
inputs:
Expand Down Expand Up @@ -47,18 +47,53 @@ concurrency:
cancel-in-progress: true

jobs:
release:
get_config:
runs-on: ubuntu-latest
outputs:
rocm_version: ${{ steps.read_config.outputs.rocm_version }}
utils_repo: ${{ steps.read_config.outputs.utils_repo }}
reports_repo: ${{ steps.read_config.outputs.reports_repo }}
backup_repo: ${{ steps.read_config.outputs.backup_repo }}
repo_org: ${{ steps.read_config.outputs.repo_org }}
perf_number: ${{ steps.read_config.outputs.perf_number }}
perf_flag: ${{ steps.read_config.outputs.perf_flag }}
perf_timeout: ${{ steps.read_config.outputs.perf_timeout }}
steps:
- name: checkout
uses: actions/[email protected]
- name: read_config
id: read_config
run: |
ROCM_VERSION=$(grep 'ROCM_VERSION' .github/workflows/config.md | cut -d "'" -f2)
BENCHMARK_UTILS_REPO=$(grep 'BENCHMARK_UTILS_REPO' .github/workflows/config.md | cut -d "'" -f2)
PERFORMANCE_REPORTS_REPO=$(grep 'PERFORMANCE_REPORTS_REPO' .github/workflows/config.md | cut -d "'" -f2)
PERFORMANCE_BACKUP_REPO=$(grep 'PERFORMANCE_BACKUP_REPO' .github/workflows/config.md | cut -d "'" -f2)
ORGANIZATION_REPO=$(grep 'ORGANIZATION_REPO' .github/workflows/config.md | cut -d "'" -f2)
RESULTS_TO_COMPARE=$(grep 'RESULTS_TO_COMPARE' .github/workflows/config.md | cut -d "'" -f2)
CALCULATION_METHOD_FLAG=$(grep 'CALCULATION_METHOD_FLAG' .github/workflows/config.md | cut -d "'" -f2)
PERFORMANCE_TEST_TIMEOUT=$(grep 'PERFORMANCE_TEST_TIMEOUT' .github/workflows/config.md | cut -d "'" -f2)
echo "rocm_version=$ROCM_VERSION" >> $GITHUB_OUTPUT
echo "utils_repo=$BENCHMARK_UTILS_REPO" >> $GITHUB_OUTPUT
echo "reports_repo=$PERFORMANCE_REPORTS_REPO" >> $GITHUB_OUTPUT
echo "backup_repo=$PERFORMANCE_BACKUP_REPO" >> $GITHUB_OUTPUT
echo "repo_org=$ORGANIZATION_REPO" >> $GITHUB_OUTPUT
echo "perf_number=$RESULTS_TO_COMPARE" >> $GITHUB_OUTPUT
echo "perf_flag=$CALCULATION_METHOD_FLAG" >> $GITHUB_OUTPUT
echo "perf_timeout=$PERFORMANCE_TEST_TIMEOUT" >> $GITHUB_OUTPUT
call_reusable:
needs: get_config
uses: ROCm/migraphx-benchmark/.github/workflows/perf-test.yml@main
with:
rocm_release: ${{ github.event.inputs.rocm_release || '6.0.2' }}
result_number: ${{ github.event.inputs.result_number || '10' }}
flags: ${{ github.event.inputs.flags || '-r' }}
performance_reports_repo: ${{ github.event.inputs.performance_reports_repo || 'ROCm/migraphx-reports' }}
performance_backup_repo: ${{ github.event.inputs.performance_backup_repo || 'migraphx-benchmark/performance-backup' }}
benchmark_utils_repo: ${{ github.event.inputs.benchmark_utils_repo || 'ROCm/migraphx-benchmark-utils' }}
organization: ${{ github.event.inputs.organization || 'AMD' }}
model_timeout: ${{ github.event.inputs.model_timeout || '30m' }}
rocm_release: ${{ github.event.inputs.rocm_release || needs.get_config.outputs.rocm_version }}
benchmark_utils_repo: ${{ github.event.inputs.benchmark_utils_repo || needs.get_config.outputs.utils_repo }}
performance_reports_repo: ${{ github.event.inputs.performance_reports_repo || needs.get_config.outputs.reports_repo }}
performance_backup_repo: ${{ github.event.inputs.performance_backup_repo || needs.get_config.outputs.backup_repo }}
organization: ${{ github.event.inputs.organization || needs.get_config.outputs.repo_org }}
result_number: ${{ github.event.inputs.result_number || needs.get_config.outputs.perf_number }}
flags: ${{ github.event.inputs.flags || needs.get_config.outputs.perf_flag }}
model_timeout: ${{ github.event.inputs.model_timeout || needs.get_config.outputs.perf_timeout }}
secrets:
gh_token: ${{ secrets.MIGRAPHX_BOT_TOKEN }}
mail_user: ${{ secrets.MAIL_USERNAME }}
mail_pass: ${{ secrets.MAIL_PASSWORD }}
mail_pass: ${{ secrets.MAIL_PASSWORD }}
90 changes: 90 additions & 0 deletions .github/workflows/sync_rocMLIR.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,90 @@
name: rocMLIR sync with extended accuracy

on:
schedule:
- cron: '0 7 * * sun'
pull_request:
branches: [develop]
types: [synchronize, closed]
workflow_dispatch:
inputs:
rocm_release:
type: string
description: ROCm release version
required: true
default: '6.0.2'
base_image:
type: string
description: Base image for ROCm Docker build
required: true
default: 'rocm/dev-ubuntu-20.04'
docker_image:
type: string
description: Docker image name for rocm Docker build
required: true
default: 'rocm-migraphx'
build_navi:
type: string
description: Build navi number
required: true
default: '0'
benchmark_utils_repo:
type: string
description: Repository where benchmark utils are stored
required: true
default: 'ROCm/migraphx-benchmark-utils'
performance_reports_repo:
description: Repository where performance reports are stored
required: true
default: 'ROCm/migraphx-reports'
organization:
type: string
description: Organization based on which location of files will be different
required: true
default: 'AMD'

jobs:
get_config:
runs-on: ubuntu-latest
outputs:
rocm_version: ${{ steps.read_config.outputs.rocm_version }}
rocm_base_image: ${{ steps.read_config.outputs.rocm_base_image }}
rocm_built_image: ${{ steps.read_config.outputs.rocm_built_image }}
use_navi: ${{ steps.read_config.outputs.use_navi }}
utils_repo: ${{ steps.read_config.outputs.utils_repo }}
reports_repo: ${{ steps.read_config.outputs.reports_repo }}
repo_org: ${{ steps.read_config.outputs.repo_org }}
steps:
- name: checkout
uses: actions/[email protected]
- name: read_config
id: read_config
run: |
ROCM_VERSION=$(grep 'ROCM_VERSION' .github/workflows/config.md | cut -d "'" -f2)
ROCM_BASE_IMAGE=$(grep 'ROCM_BASE_IMAGE' .github/workflows/config.md | cut -d "'" -f2)
ROCM_BUILT_IMAGE=$(grep 'ROCM_BUILT_IMAGE' .github/workflows/config.md | cut -d "'" -f2)
BENCHMARK_UTILS_REPO=$(grep 'BENCHMARK_UTILS_REPO' .github/workflows/config.md | cut -d "'" -f2)
PERFORMANCE_REPORTS_REPO=$(grep 'PERFORMANCE_REPORTS_REPO' .github/workflows/config.md | cut -d "'" -f2)
ORGANIZATION_REPO=$(grep 'ORGANIZATION_REPO' .github/workflows/config.md | cut -d "'" -f2)
USE_NAVI=$(grep 'USE_NAVI' .github/workflows/config.ymd | cut -d "'" -f2)
echo "rocm_version=$ROCM_VERSION" >> $GITHUB_OUTPUT
echo "rocm_base_image=$ROCM_BASE_IMAGE" >> $GITHUB_OUTPUT
echo "rocm_built_image=$ROCM_BUILT_IMAGE" >> $GITHUB_OUTPUT
echo "use_navi=$USE_NAVI" >> $GITHUB_OUTPUT
echo "utils_repo=$BENCHMARK_UTILS_REPO" >> $GITHUB_OUTPUT
echo "reports_repo=$PERFORMANCE_REPORTS_REPO" >> $GITHUB_OUTPUT
echo "repo_org=$ORGANIZATION_REPO" >> $GITHUB_OUTPUT
call_reusable:
needs: get_config
uses: ROCm/migraphx-benchmark/.github/workflows/rocMLIR_sync.yml@main
with:
rocm_release: ${{ github.event.inputs.rocm_release || needs.get_config.outputs.rocm_version }}
base_image: ${{ github.event.inputs.base_image || needs.get_config.outputs.rocm_base_image }}
docker_image: ${{ github.event.inputs.docker_image || needs.get_config.outputs.rocm_built_image }}
build_navi: ${{ github.event.inputs.build_navi || needs.get_config.outputs.use_navi }}
benchmark_utils_repo: ${{ github.event.inputs.benchmark_utils_repo || needs.get_config.outputs.utils_repo }}
performance_reports_repo: ${{ github.event.inputs.performance_reports_repo || needs.get_config.outputs.reports_repo }}
organization: ${{ github.event.inputs.organization || needs.get_config.outputs.repo_org }}
secrets:
gh_token: ${{ secrets.MIGRAPHX_BOT_TOKEN }}
23 changes: 23 additions & 0 deletions .github/workflows/weekly_master_sync.yaml
Original file line number Diff line number Diff line change
@@ -0,0 +1,23 @@
name: Master weekly sync

on:
schedule:
- cron: '0 15 * * sun'
workflow_dispatch:

jobs:
SyncAndMerge:
name: Sync master and merge develop
runs-on: ubuntu-latest
steps:

- uses: actions/[email protected]
with:
ref: develop
fetch-depth: '0'

- name: Merge Fast Forward Only
run: |
git checkout master
git merge origin/develop --ff-only
git push origin HEAD
2 changes: 1 addition & 1 deletion CHANGELOG.md
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,7 @@ Full documentation for MIGraphX is available at

### Additions

* Added FP8 support
* Added beta version of FP8, functional, not performant
* Created a dockerfile with MIGraphX+ONNX Runtime EP+Torch
* Added support for the `Hardmax`, `DynamicQuantizeLinear`, `Qlinearconcat`, `Unique`, `QLinearAveragePool`, `QLinearSigmoid`, `QLinearLeakyRelu`, `QLinearMul`, `IsInf` operators
* Created web site examples for `Whisper`, `Llama-2`, and `Stable Diffusion 2.1`
Expand Down
20 changes: 19 additions & 1 deletion CMakeLists.txt
Original file line number Diff line number Diff line change
Expand Up @@ -61,6 +61,8 @@ else()
option(MIGRAPHX_ENABLE_PYTHON "Enable python bindings" ON)
endif()

option(MIGRAPHX_USE_ROCBLAS "Enable MIGraphX to use rocBLAS" ON)

# By default build shared libraries
option(BUILD_SHARED_LIBS "Create shared libraries" ON)

Expand Down Expand Up @@ -167,6 +169,9 @@ rocm_enable_clang_tidy(
-cert-dcl51-cpp
-cert-err33-c
-cert-str34-c
# We seed random numbers with constants for reproducibility
-cert-msc32-c
-cert-msc51-cpp
# Disable all alpha checks by default
-clang-analyzer-alpha*
# Enable some alpha checks
Expand Down Expand Up @@ -328,11 +333,24 @@ foreach(py_file ${backend_files})
configure_file(${py_file} ${DEST_DIR}/lib/onnx_migraphx/. COPYONLY)
endforeach(py_file)

if(BUILD_ADDRESS_SANITIZER)
set(DEPENDS_HIP_RUNTIME "hip-runtime-amd-asan" )
else()
set(DEPENDS_HIP_RUNTIME "hip-runtime-amd" )
endif()

if(MIGRAPHX_USE_ROCBLAS)
list(APPEND PACKAGE_DEPENDS rocblas)
endif()

rocm_package_add_deb_dependencies(SHARED_DEPENDS "hip-dev")
rocm_package_add_rpm_dependencies(SHARED_DEPENDS "hip-devel")

rocm_create_package(
NAME MIGraphX
DESCRIPTION "AMD's graph optimizer"
MAINTAINER "AMDMIGraphX Maintainer <[email protected]>"
LDCONFIG
PTH
DEPENDS miopen-hip rocblas hip-rocclr hip-base half ${PACKAGE_DEPENDS}
DEPENDS miopen-hip ${DEPENDS_HIP_RUNTIME} half ${PACKAGE_DEPENDS}
)
11 changes: 7 additions & 4 deletions Dockerfile
Original file line number Diff line number Diff line change
Expand Up @@ -6,15 +6,18 @@ ARG PREFIX=/usr/local
RUN dpkg --add-architecture i386

# Install rocm key
RUN apt-get update && apt-get install -y gnupg2 --no-install-recommends curl && \
RUN apt-get update && apt-get install -y software-properties-common gnupg2 --no-install-recommends curl && \
curl -sL http://repo.radeon.com/rocm/rocm.gpg.key | apt-key add -

# Add rocm repository
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/6.0.2/ focal main > /etc/apt/sources.list.d/rocm.list'
RUN sh -c 'echo deb [arch=amd64 trusted=yes] http://repo.radeon.com/rocm/apt/6.0.2/ jammy main > /etc/apt/sources.list.d/rocm.list'

# From docs.amd.com for installing rocm. Needed to install properly
RUN sh -c "echo 'Package: *\nPin: release o=repo.radeon.com\nPin-priority: 600' > /etc/apt/preferences.d/rocm-pin-600"

# rocgdb doesn't work on 22.04, workaround by installing the older python packages that are in 20.04
RUN add-apt-repository -y ppa:deadsnakes/ppa

# Install dependencies
RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-unauthenticated \
apt-utils \
Expand All @@ -32,10 +35,10 @@ RUN apt-get update && DEBIAN_FRONTEND=noninteractive apt-get install -y --allow-
python3 \
python3-dev \
python3-pip \
software-properties-common \
libpython3.8 \
wget \
rocm-device-libs \
hip-base \
hip-dev \
libnuma-dev \
miopen-hip \
rocblas \
Expand Down
14 changes: 7 additions & 7 deletions Jenkinsfile
Original file line number Diff line number Diff line change
Expand Up @@ -155,13 +155,13 @@ rocmtest clang_debug: rocmnode('mi100+') { cmake_build ->
cmake_build(flags: "-DCMAKE_BUILD_TYPE=debug -DMIGRAPHX_ENABLE_PYTHON=Off -DMIGRAPHX_ENABLE_MLIR=On -DCMAKE_CXX_FLAGS_DEBUG='${debug_flags_cxx}' -DCMAKE_C_FLAGS_DEBUG='${debug_flags}' -DGPU_TARGETS='${gpu_targets}'")
}
}
}, ck_hiprtc: rocmnode('mi100+') { cmake_build ->
stage('CK hipRTC') {
withEnv(['MIGRAPHX_ENABLE_CK=1', 'MIGRAPHX_TUNE_CK=1', 'MIGRAPHX_DISABLE_MLIR=1']) {
def gpu_targets = getgputargets()
cmake_build(flags: "-DCMAKE_BUILD_TYPE=release -DMIGRAPHX_USE_HIPRTC=On -DGPU_TARGETS='${gpu_targets}'")
}
}
//}, ck_hiprtc: rocmnode('mi100+') { cmake_build ->
// stage('CK hipRTC') {
// withEnv(['MIGRAPHX_ENABLE_CK=1', 'MIGRAPHX_TUNE_CK=1', 'MIGRAPHX_DISABLE_MLIR=1']) {
// def gpu_targets = getgputargets()
// cmake_build(flags: "-DCMAKE_BUILD_TYPE=release -DMIGRAPHX_USE_HIPRTC=On -DGPU_TARGETS='${gpu_targets}'")
// }
// }
}, clang_asan: rocmnode('nogpu') { cmake_build ->
stage('Clang ASAN') {
def sanitizers = "undefined,address"
Expand Down
Loading

0 comments on commit 048bcda

Please sign in to comment.