Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add compiler support for offloading matmul ops to custom dispatch plugin. #71

Closed
wants to merge 43 commits into from
Closed
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
43 commits
Select commit Hold shift + click to select a range
a82e605
[TUNER] Add attribute control for splitK
ThomasRaoux Apr 7, 2022
ef721a1
[TUNER] Add attribute control for swizzle
nirvedhmeshram Apr 8, 2022
a85bd42
[TUNER] Allow split-k working on generic ops with reduction
yzhang93 Oct 11, 2022
a1607b7
[CUDA] added fucntion to sync cuda context to current thread (#8)
Eliasj42 Jun 5, 2022
09ed63d
[vulkan] Modify subspan to handle static cast.
raikonenfnu Oct 31, 2022
25e52be
[Flow] Pass to convert NCHW convolutions to NHWC
qedawkins Sep 29, 2022
6d0f50e
[codegen][spirv] Pack/transpose matrix B for better coop mmma
raikonenfnu Oct 29, 2022
85613f2
[winograd] Add winograd convolution attribute control as iree_winogra…
qedawkins Dec 12, 2022
0bcbc06
[Winograd] Winograd improvements
harsh-nod Dec 13, 2022
b78915e
[API] Expose iree-opt in python for applying flow preprocessing passes
qedawkins Jan 23, 2023
d0071dd
[COMPILER] Add a plugin to split MLIR functions
sogartar Mar 28, 2023
46bebd2
[split_mlir] Add operation list extraction and execution for IREE
sogartar Apr 5, 2023
f8dabd9
[Preprocessing] Add pass to generalize 2d convolutions
qedawkins Mar 22, 2023
fe4d119
[Preprocessing] Add a pass to convert convolutions to channels last
qedawkins Feb 16, 2023
3891bd6
Fix embedded linker flag in python exposed iree-opt
qedawkins May 10, 2023
2131e5e
Add pattern for bubbling vector.bitcast through an enclosing scf.if
qedawkins Jul 20, 2023
bb88c8e
[CI] Add ROCM builds to the the nightly
powderluv Aug 5, 2022
b968c57
[BUILD] - Remove documentation build before publishing website
powderluv Jul 8, 2023
8ed83e0
Drop CODEOWNERS to prevent sending review requests for SHARK-Runtime
qedawkins Jul 20, 2023
cda2669
[LevelZero] Add LevelZero to HAL and Codegen
raikonenfnu Jul 1, 2022
bbae570
[Distributed] Rudimentary distributed Python API (#64)
sogartar Aug 10, 2023
e1737f4
[Distributed] Add example to run a simple model across 2 GPUs
sogartar Aug 10, 2023
61da1fb
[CI] Switch to GHA linux runners, remove TF builds, move macOS to sel…
powderluv Sep 14, 2022
3b362d7
[CI] Add AArch64 builder, disable tests
powderluv Jun 3, 2023
2fd038e
Relax NCCL version constraints
sogartar Aug 10, 2023
776d797
Remove dependency of iree.runtime to iree.runtime.distributed
sogartar Aug 12, 2023
a7457c4
Switch windows to self-hosted
powderluv Aug 15, 2023
f93d1a0
clean up bindist before building
powderluv Aug 15, 2023
3cf9259
[LevelZero] remove intial data argument form buffer allocation
sogartar Aug 17, 2023
d89e4ca
Revert "[codegen][spirv] Pack/transpose matrix B for better coop mmma"
qedawkins Aug 25, 2023
70c5a05
Remove ConvertLinalgMatmulToMmt completely
vivekkhandelwal1 Aug 25, 2023
5a297ca
Add hip headers to build ROCm backend without the SDK.
monorimet Aug 24, 2023
dbfd1ab
[experimental][ROCM] Stream Command Buffer
raikonenfnu Sep 14, 2023
295292e
[ROCM] Add supports_concurrent_managed_access
raikonenfnu Sep 18, 2023
8011db3
Set preferred location to the device for HIP Managed Memory
qedawkins Sep 18, 2023
3e681ca
[LLVMCPU] Add support for dynamic quantization + reassociation of gro…
Max191 Oct 2, 2023
e0848b0
LLVMCPU reduction tiling rebase conflict fix
monorimet Oct 19, 2023
37cebe1
Current rebase status
qedawkins Nov 12, 2023
d2c0f3a
[LLVMCPU] Add tiling config pass for special non-root op tiling cases
Max191 Sep 13, 2023
36bcb7e
update deprecated AffineExpr casts
PhaneeshB Nov 15, 2023
74dfd03
Add pass for lowering to accel ukernels.
monorimet Sep 6, 2023
e71386b
(DNM) Comment out RaiseSpecialOps
monorimet Oct 20, 2023
cd109e1
Add batch mmt4d decompositions
monorimet Nov 27, 2023
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
83 changes: 0 additions & 83 deletions .github/CODEOWNERS

This file was deleted.

113 changes: 83 additions & 30 deletions .github/workflows/build_package.yml
Original file line number Diff line number Diff line change
Expand Up @@ -39,71 +39,80 @@ jobs:
matrix:
include:
# Ubuntu packages.
- runs-on: [managed-releaser, os-family=Linux, runner-group=releaser]
build-family: linux
build-package: main-dist-linux
experimental: false
- runs-on: [managed-releaser, os-family=Linux, runner-group=releaser]
- runs-on: icelake
build-family: linux
build-package: py-compiler-pkg
experimental: false
- runs-on: [managed-releaser, os-family=Linux, runner-group=releaser]
- runs-on: icelake
build-family: linux
build-package: py-runtime-pkg
experimental: false
- runs-on: [managed-releaser, os-family=Linux, runner-group=releaser]
build-family: linux
build-package: py-tf-compiler-tools-pkg
experimental: false

# MacOS packages.
- runs-on:
- ${{ github.repository == 'openxla/iree' && 'self-hosted' || 'macos-11' }}
- os-family=macOS
- runner-group=postsubmit
# Macos packages.
- runs-on: MacStudio
build-family: macos
build-package: py-compiler-pkg
experimental: true
- runs-on:
- ${{ github.repository == 'openxla/iree' && 'self-hosted' || 'macos-11' }}
- os-family=macOS
- runner-group=postsubmit
- runs-on: MacStudio
build-family: macos
build-package: py-runtime-pkg
experimental: true

# Windows packages.
- runs-on:
- ${{ github.repository == 'openxla/iree' && 'windows-2022-64core' || 'windows-2022'}}
- ${{ github.repository == 'openxla/iree' && 'windows-2022-64core' || '7950X'}}
build-family: windows
build-package: py-compiler-pkg
experimental: true
- runs-on: windows-2022
- runs-on: 7950X
build-family: windows
build-package: py-runtime-pkg
experimental: true

# Linux AArch64 packages.
- runs-on: linux-aarch64
build-family: linux-aarch64
build-package: py-compiler-pkg
experimental: false
- runs-on: linux-aarch64
build-family: linux-aarch64
build-package: py-runtime-pkg
experimental: false


env:
MANYLINUX_X86_64_IMAGE: ghcr.io/nod-ai/manylinux_x86_64:main
MANYLINUX_AARCH64_IMAGE: quay.io/pypa/manylinux_2_28_aarch64

steps:
# Docker may leave root owned files
- name: Chown user
if: "matrix.build-family == 'linux-aarch64' || matrix.build-family == 'linux'"
run: |
sudo chown -R $USER:$USER $GITHUB_WORKSPACE
- uses: actions/checkout@8f4b7f84864484a7bf31766abe9204da3cbe65b3 # v3.5.0
with:
path: "c" # Windows can hit path length limits, so use a short path.
submodules: true
ref: ${{ github.event.inputs.commit }}
- uses: actions/setup-python@v4
if: "matrix.build-family == 'windows'"
with:
python-version: '3.11'

##########################################################################
# OS specific setup
##########################################################################

- name: Install dependencies (Windows)
if: "matrix.build-family == 'windows'"
shell: powershell
run: ./c/build_tools/python_deploy/install_windows_deps.ps1
#- name: Install dependencies (Windows)
# if: "matrix.build-family == 'windows'"
# shell: powershell
# run: ./c/build_tools/python_deploy/install_windows_deps.ps1
- name: "Configure MSVC (Windows)"
if: "matrix.build-family == 'windows'"
uses: ilammy/msvc-dev-cmd@7315a94840631165970262a99c72cfb48a65d25d # v1.12.0
with:
arch: x64

##########################################################################
# Write version_info.json
Expand Down Expand Up @@ -164,7 +173,7 @@ jobs:
# One step per OS.
##########################################################################

- name: Build runtime wheels (Linux)
- name: Build runtime wheels (Linux-x86_64)
if: "matrix.build-package == 'py-runtime-pkg' && matrix.build-family == 'linux'"
shell: bash
env:
Expand All @@ -175,6 +184,17 @@ jobs:
[ -e ./bindist/* ] && rm ./bindist/*
./c/build_tools/python_deploy/build_linux_packages.sh

- name: Build runtime wheels (Linux-AArch64)
if: "matrix.build-package == 'py-runtime-pkg' && matrix.build-family == 'linux-aarch64'"
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-runtime"
output_dir: "${{ github.workspace }}/bindist"
run: |
[ -e ./bindist/* ] && rm ./bindist/*
./c/build_tools/python_deploy/build_linux_packages.sh

- name: Build runtime wheels (MacOS)
if: "matrix.build-package == 'py-runtime-pkg' && matrix.build-family == 'macos'"
shell: bash
Expand Down Expand Up @@ -217,6 +237,16 @@ jobs:
[ -e ./bindist/* ] && rm ./bindist/*
./c/build_tools/python_deploy/build_linux_packages.sh

- name: Build compiler wheels (Linux-AArch64)
if: "matrix.build-package == 'py-compiler-pkg' && matrix.build-family == 'linux-aarch64'"
shell: bash
env:
package_suffix: ${{ github.event.inputs.package_suffix }}
packages: "iree-compiler"
output_dir: "${{ github.workspace }}/bindist"
run: |
./c/build_tools/python_deploy/build_linux_packages.sh

- name: Build compiler wheels (MacOS)
if: "matrix.build-package == 'py-compiler-pkg' && matrix.build-family == 'macos'"
shell: bash
Expand Down Expand Up @@ -265,10 +295,10 @@ jobs:
path: ./bindist/*
retention-days: 5

# TODO: Upload the tar.bz2 files too when ready
- name: Upload Release Assets
if: github.event.inputs.release_id != ''
id: upload-release-assets
# TODO: One Window Release builds we build both compiler+runtime
- name: Upload Release Assets (Windows)
if: "github.event.inputs.release_id != '' && matrix.build-family == 'windows'"
id: upload-release-assets-windows
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
Expand All @@ -277,6 +307,29 @@ jobs:
# Only upload iree artifacts.
assets_path: ./bindist/iree*.*

# TODO: Upload the tar.bz2 files too when ready
- name: Upload Release Assets (Compiler)
if: "github.event.inputs.release_id != '' && matrix.build-package == 'py-compiler-pkg' && matrix.build-family != 'windows'"
id: upload-release-assets-compiler
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
with:
release_id: ${{ github.event.inputs.release_id }}
# Only upload iree artifacts.
assets_path: ./bindist/iree_compiler*.*

- name: Upload Release Assets (Runtime)
if: "github.event.inputs.release_id != '' && matrix.build-package == 'py-runtime-pkg' && matrix.build-family != 'windows'"
id: upload-release-assets-runtime
uses: dwenegar/upload-release-assets@5bc3024cf83521df8ebfadf00ad0c4614fd59148 # v1
env:
GITHUB_TOKEN: ${{ secrets.WRITE_ACCESS_TOKEN }}
with:
release_id: ${{ github.event.inputs.release_id }}
# Only upload iree artifacts.
assets_path: ./bindist/iree_runtime*.*

validate_and_publish:
name: "Trigger validate and publish release"
needs: build_packages
Expand Down
15 changes: 0 additions & 15 deletions .github/workflows/publish_website.yml
Original file line number Diff line number Diff line change
Expand Up @@ -44,13 +44,6 @@ jobs:
with:
python-version: 3.x
cache: 'pip'
- id: "gcp-auth"
name: "Authenticating to Google Cloud"
uses: "google-github-actions/auth@v1"
with:
token_format: "access_token"
credentials_json: "${{ secrets.IREE_OSS_GITHUB_RUNNER_BASIC_TRUST_SERVICE_ACCOUNT_KEY }}"
create_credentials_file: false
- name: Installing dependencies
run: |
pip install -r docs/website/requirements.txt
Expand All @@ -60,14 +53,6 @@ jobs:
./build_tools/scripts/generate_release_index.py \
--repo="${GITHUB_REPOSITORY}" \
--output=docs/website/docs/pip-release-links.html
- name: Building documentation files
run: |
./build_tools/github_actions/docker_run.sh \
--env "IREE_CCACHE_GCP_TOKEN=${{ steps.gcp-auth.outputs.access_token }}" \
--env "IREE_WRITE_REMOTE_CCACHE=1" \
--env "CCACHE_NAMESPACE=gcr.io/iree-oss/base@sha256:796fb81a11ff7e7d057c93de468b74e48b6a9641aa19b7f7673c2772e8ea3b33" \
gcr.io/iree-oss/base@sha256:796fb81a11ff7e7d057c93de468b74e48b6a9641aa19b7f7673c2772e8ea3b33 \
./docs/website/generate_extra_files.sh
- name: Setting git config
run: |
git config --local user.email "iree-github-actions-bot@google.com"
Expand Down
69 changes: 69 additions & 0 deletions .github/workflows/sync.yml
Original file line number Diff line number Diff line change
@@ -0,0 +1,69 @@
name: 'Sync Upstream'

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

jobs:
sync_upstream:
name: 'Sync Upstream'
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v3
with:
token: ${{ secrets.CI_WRITE_TOKEN }}
repository: nod-ai/shark-runtime
ref: main
fetch-depth: 0

- name: Setup git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "SHARK bot"

- name: Update main upstream
run: |
set -ex
git remote add upstream https://github.com/iree-org/iree
git pull --ff-only upstream main

- name: Pushing changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.CI_WRITE_TOKEN }}
branch: main
repository: nod-ai/shark-runtime

rebase_shark:
name: 'Rebase SHARK'
runs-on: ubuntu-latest
steps:
- name: Checking out repository
uses: actions/checkout@v3
with:
token: ${{ secrets.CI_WRITE_TOKEN }}
repository: nod-ai/shark-runtime
ref: shark
fetch-depth: 0

- name: Setup git
run: |
git config --local user.email "github-actions[bot]@users.noreply.github.com"
git config --local user.name "SHARK bot"

- name: Update shark upstream
run: |
set -ex
git remote add upstream https://github.com/iree-org/iree
git fetch upstream
git rebase upstream/main

- name: Pushing changes
uses: ad-m/github-push-action@master
with:
github_token: ${{ secrets.CI_WRITE_TOKEN }}
branch: shark
repository: nod-ai/shark-runtime
force_with_lease: true
Loading
Loading