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

[mpact][sparse] run pre-sparsification-rewrite before elementwise fus… #57

Merged
merged 2 commits into from
Jun 28, 2024
Merged
Show file tree
Hide file tree
Changes from all commits
Commits
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
3 changes: 3 additions & 0 deletions python/mpact/mpactbackend.py
Original file line number Diff line number Diff line change
Expand Up @@ -212,6 +212,9 @@ def invoke(*args):
+ ",".join(
[
"func.func(linalg-generalize-named-ops)",
# Run pre-sparsification pass to fuse convert/cast op into
# producer as they might hinder kernel fusions.
"pre-sparsification-rewrite",
"func.func(linalg-fuse-elementwise-ops)",
"convert-shape-to-std",
# Propagate sparse encodings before sparsifier mini-pipeline.
Expand Down
6 changes: 4 additions & 2 deletions test/python/sqsum.py
Original file line number Diff line number Diff line change
Expand Up @@ -28,8 +28,10 @@

# Run it with MPACT.
print("mpact")
# TODO: make this work, expose `sparse-emit-strategy=sparse-iterator` to
# mini-pipeline.
# Try sparsification with sparse iterator
# TODO: will work after explicit value is specified in the encoding.
# res = mpact_jit(net, adj_mat, use_sp_it=True)
# print(res)
# Try sparsification directly with scf.for/while
res = mpact_jit(net, adj_mat)
print(res)
Loading