From d7ff2a9209fb2985522e78e47f57f0e32934aea4 Mon Sep 17 00:00:00 2001 From: Bangtian Liu Date: Tue, 7 Jan 2025 16:41:19 -0600 Subject: [PATCH] fix the conflicts and pytest error Signed-off-by: Bangtian Liu --- tuner/examples/test/tuner_test.py | 1 - tuner/tuner/common.py | 2 -- tuner/tuner/dispatch_parser_test.py | 3 --- tuner/tuner/libtuner.py | 3 +-- 4 files changed, 1 insertion(+), 8 deletions(-) diff --git a/tuner/examples/test/tuner_test.py b/tuner/examples/test/tuner_test.py index 7d4fa58bf..4de6ab74d 100644 --- a/tuner/examples/test/tuner_test.py +++ b/tuner/examples/test/tuner_test.py @@ -91,7 +91,6 @@ def main(): path_config = libtuner.PathConfig() path_config.base_dir.mkdir(parents=True, exist_ok=True) - path_config.output_unilog.touch() # TODO(Max191): Make candidate_trackers internal to TuningClient. candidate_trackers: list[libtuner.CandidateTracker] = [] stop_after_phase: str = args.stop_after diff --git a/tuner/tuner/common.py b/tuner/tuner/common.py index b69ffe0e5..c4909b399 100644 --- a/tuner/tuner/common.py +++ b/tuner/tuner/common.py @@ -10,12 +10,10 @@ from types import TracebackType from typing import Optional from typing import Any -from typing_extensions import Literal from iree.compiler import ir # type: ignore from iree.compiler.dialects import iree_gpu # type: ignore -from iree.compiler.dialects import iree_codegen # type: ignore class CommonTypes: diff --git a/tuner/tuner/dispatch_parser_test.py b/tuner/tuner/dispatch_parser_test.py index df1208acf..204f84b28 100644 --- a/tuner/tuner/dispatch_parser_test.py +++ b/tuner/tuner/dispatch_parser_test.py @@ -27,10 +27,7 @@ def tuner_ctx() -> Generator[common.TunerContext, None, None]: from logging import Logger from unittest.mock import MagicMock - # Mock the logger mock_logger = MagicMock(spec=Logger) - - # Use TunerContext with the mocked logger with common.TunerContext(logger=mock_logger) as ctx: yield ctx diff --git a/tuner/tuner/libtuner.py b/tuner/tuner/libtuner.py index 9bcfb5077..b18736ffb 100644 --- a/tuner/tuner/libtuner.py +++ b/tuner/tuner/libtuner.py @@ -18,7 +18,6 @@ import math import signal -import subprocess import sys import shutil import logging @@ -26,7 +25,6 @@ from datetime import datetime from enum import Enum from pathlib import Path -import time import multiprocessing import queue from tqdm import tqdm @@ -37,6 +35,7 @@ import iree.runtime as ireert # type: ignore import iree.compiler as ireec # type: ignore from iree.compiler import ir # type: ignore +from iree.compiler.dialects import iree_codegen # type: ignore from . import candidate_gen from . import dispatch_parser from .op_matchers import *