-
Notifications
You must be signed in to change notification settings - Fork 39
Commit
This commit does not belong to any branch on this repository, and may belong to a fork outside of the repository.
[TKW] Fix sympy expr lowering and add some more igemm test shapes (#184)
* Rework how we are lowering `rational` sympy expressions, instead of delayed materialization via lambdas introduce `_Rational` type and propagate `numerator/denominator` values independently. Division will only be materialized on explicit `sympy.floor/ceiling` op. * Rework how igemm test cases are generated and introduce few real shapes. * Use custom pytest markers to separate perf/non-perf tests --------- Signed-off-by: Ivan Butygin <[email protected]>
- Loading branch information
1 parent
553e929
commit 9ed388a
Showing
3 changed files
with
346 additions
and
79 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
Original file line number | Diff line number | Diff line change |
---|---|---|
@@ -0,0 +1,31 @@ | ||
# Copyright 2024 The IREE Authors | ||
# | ||
# Licensed under the Apache License v2.0 with LLVM Exceptions. | ||
# See https://llvm.org/LICENSE.txt for license information. | ||
# SPDX-License-Identifier: Apache-2.0 WITH LLVM-exception | ||
|
||
import pytest | ||
|
||
|
||
def pytest_addoption(parser): | ||
parser.addoption( | ||
"--runperf", action="store_true", default=False, help="run performance tests" | ||
) | ||
|
||
|
||
def pytest_configure(config): | ||
config.addinivalue_line( | ||
"markers", "perf_only: performace test, runs only with '--runperf'" | ||
) | ||
|
||
|
||
def pytest_collection_modifyitems(config, items): | ||
run_perf = config.getoption("--runperf") | ||
for item in items: | ||
is_perf_only = next(item.iter_markers("perf_only"), None) is not None | ||
if run_perf: | ||
if not is_perf_only: | ||
item.add_marker(pytest.mark.skip("skip non-perf test")) | ||
else: | ||
if is_perf_only: | ||
item.add_marker(pytest.mark.skip("skip perf test")) |
Oops, something went wrong.