-
Notifications
You must be signed in to change notification settings - Fork 4
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
Showing
12 changed files
with
89 additions
and
42 deletions.
There are no files selected for viewing
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -8,15 +8,15 @@ on: | |
|
||
jobs: | ||
build-and-run-kernels: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/kuleuven-micas/snax:v0.2.7 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install snax-mlir | ||
run: python3 -m pip install '-e.[dev]' | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
- name: Build and run kernels | ||
run: make allrun | ||
run: pixi run make allrun | ||
working-directory: kernels/${{ matrix.kernel }} | ||
strategy: | ||
matrix: | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -9,9 +9,7 @@ on: | |
|
||
jobs: | ||
build-and-run-networks: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/kuleuven-micas/snax:v0.2.7 | ||
runs-on: ubuntu-24.04 | ||
strategy: | ||
matrix: | ||
model: | ||
|
@@ -25,15 +23,16 @@ jobs: | |
dir: kernels/mlperf_tiny_kws | ||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install snax-mlir | ||
run: | | ||
python3 -m pip install '-e.[dev,nn]' | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
- name: snax-opt network compilation | ||
run: | | ||
make ${{ matrix.model.name }}.o | ||
pixi run make ${{ matrix.model.name }}.o | ||
working-directory: ${{ matrix.model.dir }} | ||
- name: vanilla network compilation | ||
run: | | ||
make ${{ matrix.model.name }}.no-snax-opt.o | ||
pixi run make ${{ matrix.model.name }}.no-snax-opt.o | ||
working-directory: ${{ matrix.model.dir }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -6,7 +6,7 @@ on: | |
|
||
jobs: | ||
code-formatting: | ||
runs-on: ubuntu-22.04 | ||
runs-on: ubuntu-latest | ||
steps: | ||
- uses: actions/checkout@v3 | ||
|
||
|
@@ -17,4 +17,4 @@ jobs: | |
|
||
- name: Run code formatting checks with pre-commit | ||
uses: pre-commit/[email protected] | ||
|
||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,18 +12,16 @@ permissions: | |
jobs: | ||
python-tests: | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/kuleuven-micas/snax:v0.2.7 | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install snax-mlir | ||
shell: bash | ||
run: | | ||
python3 -m pip install '-e.[dev]' | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
- name: Test with lit | ||
shell: bash | ||
run: | | ||
lit tests/filecheck -v | ||
pixi run lit tests/filecheck -v | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -12,18 +12,16 @@ permissions: | |
jobs: | ||
python-tests: | ||
|
||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/kuleuven-micas/snax:v0.2.7 | ||
runs-on: ubuntu-24.04 | ||
|
||
steps: | ||
- uses: actions/checkout@v3 | ||
- name: Install snax-mlir | ||
shell: bash | ||
run: | | ||
python3 -m pip install '-e.[dev]' | ||
- uses: prefix-dev/[email protected] | ||
with: | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
- name: Test with pytest | ||
shell: bash | ||
run: | | ||
python3 -m pytest . | ||
pixi run python -m pytest . | ||
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
|
@@ -10,14 +10,13 @@ on: | |
|
||
jobs: | ||
run-benchmarks: | ||
runs-on: ubuntu-latest | ||
container: | ||
image: ghcr.io/kuleuven-micas/snax:v0.2.7 | ||
runs-on: ubuntu-24.04 | ||
steps: | ||
- name: Checkout repository | ||
uses: actions/checkout@v4 | ||
- name: Install snax-mlir | ||
run: python3 -m pip install '-e.[dev,viz]' | ||
- uses: actions/checkout@v4 | ||
- uses: actions/prefix-dev/[email protected] | ||
with: | ||
cache: true | ||
cache-write: ${{ github.event_name == 'push' && github.ref_name == 'main' }} | ||
- name: Run benchmarks | ||
run: python3 genbenchmark.py | ||
working-directory: benchmarks/${{ matrix.kernel }} | ||
|
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
31 changes: 31 additions & 0 deletions
31
compiler/transforms/test/test_transform_dialect_erase_schedule.py
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
from xdsl.context import MLContext | ||
from xdsl.dialects import builtin, transform | ||
from xdsl.passes import ModulePass | ||
from xdsl.pattern_rewriter import ( | ||
PatternRewriter, | ||
PatternRewriteWalker, | ||
RewritePattern, | ||
op_type_rewrite_pattern, | ||
) | ||
|
||
|
||
class RemoveSchedule(RewritePattern): | ||
@op_type_rewrite_pattern | ||
def match_and_rewrite( | ||
self, | ||
op: transform.NamedSequenceOp | transform.SequenceOp, | ||
rewriter: PatternRewriter, | ||
/, | ||
): | ||
rewriter.erase_matched_op() | ||
|
||
|
||
class TestTransformDialectEraseSchedule(ModulePass): | ||
""" | ||
Copy of the test-transform-dialect-erase-schedule pass in MLIR | ||
""" | ||
|
||
name = "test-transform-dialect-erase-schedule" | ||
|
||
def apply(self, ctx: MLContext, op: builtin.ModuleOp) -> None: | ||
PatternRewriteWalker(RemoveSchedule()).rewrite_module(op) |
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Some generated files are not rendered by default. Learn more about how customized files appear on GitHub.
Oops, something went wrong.
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
This file contains bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters