-
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.
move dispatching rules to global file
- Loading branch information
1 parent
ad8dca1
commit 28b1aac
Showing
3 changed files
with
24 additions
and
24 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
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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,17 @@ | ||
from xdsl.dialects import memref, linalg | ||
|
||
|
||
def dispatch_to_dm(op): | ||
"""Rule to dispatch operations to the dm core: | ||
for now, this is only memref copy operations""" | ||
if isinstance(op, memref.CopyOp): | ||
return True | ||
return False | ||
|
||
|
||
def dispatch_to_compute(op): | ||
"""Rule to dispatch operations to the dm core: | ||
for now, this is only linalg generic operations""" | ||
if isinstance(op, linalg.Generic): | ||
return True | ||
return False |