Skip to content

Commit

Permalink
Merge branch 'develop' of https://github.com/ROCm/AMDMIGraphX into pa…
Browse files Browse the repository at this point in the history
…rse_qconv_bias_fix
  • Loading branch information
kahmed10 committed Jan 17, 2025
2 parents ada1625 + 720bc53 commit 722b571
Show file tree
Hide file tree
Showing 5 changed files with 41 additions and 26 deletions.
48 changes: 24 additions & 24 deletions .github/workflows/ci.yaml
Original file line number Diff line number Diff line change
Expand Up @@ -20,7 +20,7 @@ jobs:
runs-on: ubuntu-latest
steps:
- name: Cancel Previous Runs
uses: styfle/cancel-workflow-action@0.11.0
uses: styfle/cancel-workflow-action@0.12.1
with:
access_token: ${{ github.token }}

Expand All @@ -35,7 +35,7 @@ jobs:

steps:
- name: Checkout Code
uses: actions/checkout@v4.1.1
uses: actions/checkout@v4.2.2

- name: Create Image Tag
id: image_hash
Expand Down Expand Up @@ -72,7 +72,7 @@ jobs:
needs: check_image
if: ${{ needs.check_image.outputs.imageexists != 'true' }}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2

- name: Build and publish
env:
Expand All @@ -94,7 +94,7 @@ jobs:
needs: check_image
if: ${{ needs.check_image.outputs.imageexists_sles != 'true' }}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
- name: Build and publish SLES
env:
DOCKER_TAG_SLES: ${{ needs.check_image.outputs.imagetag_sles }}
Expand All @@ -118,10 +118,10 @@ jobs:

if: ${{ !cancelled() && (needs.build_image.result == 'success' || needs.build_image.result == 'skipped') }}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2

- name: Restore cache files for tidy
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4.2.0
id: tidy_restore
with:
path: tidy-cache
Expand Down Expand Up @@ -157,7 +157,7 @@ jobs:
gh actions-cache delete ${{ steps.tidy_restore.outputs.cache-matched-key }} --confirm
- name: Save cache files for tidy
uses: actions/cache/save@v3
uses: actions/cache/save@v4.2.0
if: always()
with:
path: tidy-cache
Expand All @@ -172,11 +172,11 @@ jobs:

if: ${{ !cancelled() && (needs.build_image.result == 'success' || needs.build_image.result == 'skipped') }}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2

- name: Restore cache files for cppcheck
id: cppcheck_restore
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4.2.0
with:
path: cppcheck-cache
key: cppcheck-cache-1-${{ hashFiles('tools/cppcheck/rules.xml', 'tools/cppcheck/migraphx.py', 'CMakeLists.txt') }}-${{ github.ref }}
Expand Down Expand Up @@ -207,7 +207,7 @@ jobs:
gh actions-cache delete ${{ steps.cppcheck_restore.outputs.cache-matched-key }} --confirm
- name: Save cache files for cppcheck
uses: actions/cache/save@v3
uses: actions/cache/save@v4.2.0
if: always()
with:
path: cppcheck-cache
Expand All @@ -222,7 +222,7 @@ jobs:

if: ${{ !cancelled() && (needs.build_image.result == 'success' || needs.build_image.result == 'skipped') }}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0

Expand Down Expand Up @@ -253,12 +253,12 @@ jobs:

if: ${{ !cancelled() && (needs.build_SLES_image.result == 'success' || needs.build_SLES_image.result == 'skipped') }}
steps:
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0

- name: Restore cache files for ccache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4.2.0
id: ccache_restore
with:
path: ${{ github.workspace }}/ccache
Expand Down Expand Up @@ -297,7 +297,7 @@ jobs:
gh actions-cache delete ${{ steps.ccache_restore.outputs.cache-matched-key }} --confirm
- name: Save cache files for ccache
uses: actions/cache/save@v3
uses: actions/cache/save@v4.2.0
if: always()
with:
path: ${{ github.workspace }}/ccache
Expand All @@ -319,7 +319,7 @@ jobs:
swap-storage: true
docker-images: true

- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand Down Expand Up @@ -350,7 +350,7 @@ jobs:
swap-storage: true
docker-images: true

- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
with:
fetch-depth: 0 # Fetch the entire repository history and all branches
- name: Set up Python
Expand Down Expand Up @@ -399,15 +399,15 @@ jobs:
python -m pip install --upgrade pip
pip install https://github.com/RadeonOpenCompute/rbuild/archive/master.tar.gz
- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v4
with:
python-version: 3.7
- name: Cache dependencies
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
uses: actions/cache@v3
uses: actions/cache@v4.2.0
id: deps_cache
with:
# This path is specific to Ubuntu
Expand All @@ -420,7 +420,7 @@ jobs:
run: rbuild prepare -d cget -s gh

- name: Restore cache files for ccache
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4.2.0
id: ccache_restore
with:
path: ${{ github.workspace }}/ccache
Expand Down Expand Up @@ -458,7 +458,7 @@ jobs:
gh actions-cache delete ${{ steps.ccache_restore.outputs.cache-matched-key }} --confirm
- name: Save cache files for ccache
uses: actions/cache/save@v3
uses: actions/cache/save@v4.2.0
if: always()
with:
path: ${{ github.workspace }}/ccache
Expand Down Expand Up @@ -512,7 +512,7 @@ jobs:
swap-storage: true
docker-images: true

- uses: actions/checkout@v4.1.1
- uses: actions/checkout@v4.2.2
- name: Set up Python
uses: actions/setup-python@v4
with:
Expand All @@ -521,7 +521,7 @@ jobs:
- name: Cache dependencies
# Ignore the failure of a step and avoid terminating the job.
continue-on-error: true
uses: actions/cache@v3
uses: actions/cache@v4.2.0
with:
# This path is specific to Ubuntu
path: ${{ github.workspace }}/cget
Expand All @@ -539,7 +539,7 @@ jobs:
- name: Restore cache files for ccache
id: ccache_restore_fpga
uses: actions/cache/restore@v3
uses: actions/cache/restore@v4.2.0
with:
path: ${{ github.workspace }}/ccache
key: ${{ matrix.os }}-${{ matrix.configuration }}-ccache-${{ github.ref }}
Expand Down Expand Up @@ -577,7 +577,7 @@ jobs:
gh actions-cache delete ${{ steps.ccache_restore_fpga.outputs.cache-matched-key }} --confirm
- name: Save cache files for ccache
uses: actions/cache/save@v3
uses: actions/cache/save@v4.2.0
if: always()
with:
path: ${{ github.workspace }}/ccache
Expand Down
6 changes: 6 additions & 0 deletions docs/dev/env_vars.rst
Original file line number Diff line number Diff line change
Expand Up @@ -154,6 +154,7 @@ Disables layrnorm fusion.
Set to "1", "enable", "enabled", "yes", or "true" to use.
Disables use of MIOpen for pooling operations and uses JIT implementation instead.


Compilation traces
----------------------

Expand All @@ -177,6 +178,11 @@ Prints the compile pass and the program after the pass.
Set to "1", "enable", "enabled", "yes", or "true" to use.
Times the compile passes.

.. envvar:: MIGRAPHX_DISABLE_PASSES

Set to the name of the pass you want to skip. Comma separated list is supported
Example "rewrite_pooling,rewrite_gelu"


GPU kernels JIT compilation debugging
----------------------------------------
Expand Down
2 changes: 1 addition & 1 deletion docs/sphinx/requirements.in
Original file line number Diff line number Diff line change
@@ -1,2 +1,2 @@
rocm-docs-core==1.12.0
rocm-docs-core==1.13.0
sphinx-collapse
2 changes: 1 addition & 1 deletion docs/sphinx/requirements.txt
Original file line number Diff line number Diff line change
Expand Up @@ -116,7 +116,7 @@ requests==2.32.3
# via
# pygithub
# sphinx
rocm-docs-core==1.12.0
rocm-docs-core==1.13.0
# via -r requirements.in
smmap==5.0.1
# via gitdb
Expand Down
9 changes: 9 additions & 0 deletions src/pass_manager.cpp
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,13 @@ inline namespace MIGRAPHX_INLINE_NS {

MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_TRACE_PASSES);
MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_TIME_PASSES);
MIGRAPHX_DECLARE_ENV_VAR(MIGRAPHX_DISABLE_PASSES);

static bool is_pass_disabled(const std::string& name)
{
static const auto passes = split_string(string_value_of(MIGRAPHX_DISABLE_PASSES{}, ""), ',');
return contains(passes, name);
}

void validate_pass(module& mod, const pass& p, tracer trace)
{
Expand Down Expand Up @@ -126,6 +133,8 @@ struct module_pm : module_pass_manager

virtual void run_pass(const pass& p) override
{
if(is_pass_disabled(p.name()))
return;
trace("Pass: ", p.name());
assert(mod);
assert(mod->validate() == mod->end());
Expand Down

0 comments on commit 722b571

Please sign in to comment.