Skip to content

Commit

Permalink
Update common_test.py
Browse files Browse the repository at this point in the history
  • Loading branch information
makslevental committed Dec 10, 2024
1 parent e151c65 commit cc4154c
Show file tree
Hide file tree
Showing 3 changed files with 7 additions and 8 deletions.
4 changes: 3 additions & 1 deletion tuner/tuner/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,7 +4,8 @@
# See https://llvm.org/LICENSE.txt for license information.
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception

from iree.compiler import ir
from iree.compiler import ir # type: ignore


# substitute replace=True so that colliding registration don't error
def register_attribute_builder(kind, replace=True):
Expand All @@ -14,4 +15,5 @@ def decorator_builder(func):

return decorator_builder


ir.register_attribute_builder = register_attribute_builder
7 changes: 0 additions & 7 deletions tuner/tuner/common_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -217,10 +217,3 @@ def test_get_lowering_config(tuner_ctx: common.TunerContext) -> None:

assert config.lowering_config.mma_kind is None
assert config.lowering_config.subgroup_count_mn == (1, 1)


def test_enum_collision():
from iree.compiler.dialects import linalg, vector

linalg_iter_type_e = linalg._iteratortype(0, None)
vector_iter_type_e = vector._vector_iteratortype(0, None)
4 changes: 4 additions & 0 deletions tuner/tuner/libtuner_test.py
Original file line number Diff line number Diff line change
Expand Up @@ -499,3 +499,7 @@ def test_validate_devices_with_invalid_device() -> None:
exit_program=True,
)
assert expected_call in mock_handle_error.call_args_list


def test_enum_collision():
from iree.compiler.dialects import linalg, vector

0 comments on commit cc4154c

Please sign in to comment.