-
Notifications
You must be signed in to change notification settings - Fork 7
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
- fix trampolines casing bug - fix configuration again - warn about TypeID instead of crash
- Loading branch information
1 parent
074afc8
commit 70dbd55
Showing
10 changed files
with
183 additions
and
30 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
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
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,35 @@ | ||
import inspect | ||
from textwrap import dedent | ||
|
||
import pytest | ||
|
||
from mlir_utils.dialects.ext.arith import constant | ||
from mlir_utils.dialects.ext.func import func | ||
|
||
# noinspection PyUnresolvedReferences | ||
from mlir_utils.testing import mlir_ctx as ctx, filecheck, MLIRContext | ||
|
||
# needed since the fix isn't defined here nor conftest.py | ||
pytest.mark.usefixtures("ctx") | ||
|
||
|
||
def test_emit(ctx: MLIRContext): | ||
@func | ||
def demo_fun1(): | ||
one = constant(1) | ||
return one | ||
|
||
assert hasattr(demo_fun1, "emit") | ||
assert inspect.isfunction(demo_fun1.emit) | ||
demo_fun1.emit() | ||
correct = dedent( | ||
"""\ | ||
module { | ||
func.func @demo_fun1() -> i64 { | ||
%c1_i64 = arith.constant 1 : i64 | ||
return %c1_i64 : i64 | ||
} | ||
} | ||
""" | ||
) | ||
filecheck(correct, ctx.module) |
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