diff --git a/apps/x86/conv/conv.py b/apps/x86/conv/conv.py index b89706e4f..975d22a33 100644 --- a/apps/x86/conv/conv.py +++ b/apps/x86/conv/conv.py @@ -3,7 +3,7 @@ from exo import * from exo.libs.externs import * from exo.platforms.x86 import * -from exo.syntax import * +from exo.frontend.syntax import * from exo.stdlib.scheduling import * diff --git a/apps/x86/sgemm/sgemm.py b/apps/x86/sgemm/sgemm.py index ea1f663ef..1d2e005b6 100644 --- a/apps/x86/sgemm/sgemm.py +++ b/apps/x86/sgemm/sgemm.py @@ -3,7 +3,7 @@ from exo import * from exo.libs.memories import DRAM_STATIC from exo.platforms.x86 import * -from exo.syntax import * +from exo.frontend.syntax import * from exo.stdlib.scheduling import * from exo.stdlib.stdlib import * diff --git a/src/exo/API.py b/src/exo/API.py index 2dea74528..3a690ca3d 100644 --- a/src/exo/API.py +++ b/src/exo/API.py @@ -5,27 +5,27 @@ from pathlib import Path from typing import Optional, Union, List -import exo.LoopIR_scheduling as scheduling -from exo.LoopIR_scheduling import SchedulingError +import exo.rewrite.LoopIR_scheduling as scheduling +from exo.rewrite.LoopIR_scheduling import SchedulingError from .API_types import ProcedureBase, ExoType -from . import LoopIR as LoopIR -from .LoopIR_compiler import run_compile, compile_to_strings -from .configs import Config -from .boundscheck import CheckBounds -from .memory import Memory -from .parse_fragment import parse_fragment -from .pattern_match import match_pattern -from .prelude import * -from .new_eff import Check_Aliasing +from .core import LoopIR as LoopIR +from .backend.LoopIR_compiler import run_compile, compile_to_strings +from .core.configs import Config +from .frontend.boundscheck import CheckBounds +from .core.memory import Memory +from .frontend.parse_fragment import parse_fragment +from .frontend.pattern_match import match_pattern +from .core.prelude import * +from .rewrite.new_eff import Check_Aliasing # Moved to new file -from .proc_eqv import decl_new_proc, derive_proc, assert_eqv_proc, check_eqv_proc -from .pyparser import get_ast_from_python, Parser, get_src_locals -from .typecheck import TypeChecker +from .core.proc_eqv import decl_new_proc, derive_proc, assert_eqv_proc, check_eqv_proc +from .frontend.pyparser import get_ast_from_python, Parser, get_src_locals +from .frontend.typecheck import TypeChecker from . import API_cursors as C -from . import internal_cursors as IC +from .core import internal_cursors as IC # --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- # diff --git a/src/exo/API_cursors.py b/src/exo/API_cursors.py index 639157462..e9b090544 100644 --- a/src/exo/API_cursors.py +++ b/src/exo/API_cursors.py @@ -7,18 +7,18 @@ from . import API # TODO: remove this circular import from .API_types import ExoType, loopir_type_to_exotype -from .LoopIR import LoopIR -from .configs import Config -from .memory import Memory +from .core.LoopIR import LoopIR +from .core.configs import Config +from .core.memory import Memory -from . import internal_cursors as C -from .pattern_match import match_pattern -from .prelude import Sym +from .core import internal_cursors as C +from .frontend.pattern_match import match_pattern +from .core.prelude import Sym # expose this particular exception as part of the API -from .internal_cursors import InvalidCursorError -from .LoopIR_pprint import _print_cursor -from .LoopIR_scheduling import SchedulingError +from .core.internal_cursors import InvalidCursorError +from .core.LoopIR_pprint import _print_cursor +from .rewrite.LoopIR_scheduling import SchedulingError # --------------------------------------------------------------------------- # diff --git a/src/exo/API_scheduling.py b/src/exo/API_scheduling.py index 9a23d6faf..c35bc280a 100644 --- a/src/exo/API_scheduling.py +++ b/src/exo/API_scheduling.py @@ -9,16 +9,16 @@ from .API import Procedure import exo.API_cursors as PC -from .LoopIR import LoopIR, T -import exo.LoopIR_scheduling as scheduling +from .core.LoopIR import LoopIR, T +import exo.rewrite.LoopIR_scheduling as scheduling from .API_types import ExoType -from .LoopIR_unification import DoReplace, UnificationError -from .configs import Config -from .memory import Memory -from .parse_fragment import parse_fragment -from .prelude import * -from . import internal_cursors as ic +from .rewrite.LoopIR_unification import DoReplace, UnificationError +from .core.configs import Config +from .core.memory import Memory +from .frontend.parse_fragment import parse_fragment +from .core.prelude import * +from .core import internal_cursors as ic def is_subclass_obj(x, cls): diff --git a/src/exo/API_types.py b/src/exo/API_types.py index e87e22f43..a3deabab9 100644 --- a/src/exo/API_types.py +++ b/src/exo/API_types.py @@ -1,5 +1,5 @@ from enum import Enum, auto -from .LoopIR import LoopIR, T +from .core.LoopIR import LoopIR, T class ProcedureBase: diff --git a/src/exo/__init__.py b/src/exo/__init__.py index 6aa3a1ac1..e335f72da 100644 --- a/src/exo/__init__.py +++ b/src/exo/__init__.py @@ -7,11 +7,11 @@ config, ExoType, ) -from .LoopIR_scheduling import SchedulingError -from .parse_fragment import ParseFragmentError -from .configs import Config -from .memory import Memory, DRAM -from .extern import Extern +from .rewrite.LoopIR_scheduling import SchedulingError +from .frontend.parse_fragment import ParseFragmentError +from .core.configs import Config +from .core.memory import Memory, DRAM +from .core.extern import Extern from . import stdlib diff --git a/src/exo/LoopIR_compiler.py b/src/exo/backend/LoopIR_compiler.py similarity index 99% rename from src/exo/LoopIR_compiler.py rename to src/exo/backend/LoopIR_compiler.py index 0520b7387..090a215de 100644 --- a/src/exo/LoopIR_compiler.py +++ b/src/exo/backend/LoopIR_compiler.py @@ -6,15 +6,15 @@ from dataclasses import dataclass from pathlib import Path -from .LoopIR import LoopIR, LoopIR_Do, get_writes_of_stmts, T, CIR -from .configs import ConfigError +from ..core.LoopIR import LoopIR, LoopIR_Do, get_writes_of_stmts, T, CIR +from ..core.configs import ConfigError from .mem_analysis import MemoryAnalysis -from .memory import MemGenError, Memory, DRAM, StaticMemory +from ..core.memory import MemGenError, Memory, DRAM, StaticMemory from .parallel_analysis import ParallelAnalysis from .prec_analysis import PrecisionAnalysis -from .prelude import * +from ..core.prelude import * from .win_analysis import WindowAnalysis -from .range_analysis import IndexRangeEnvironment +from ..rewrite.range_analysis import IndexRangeEnvironment def sanitize_str(s): diff --git a/src/exo/backend/__init__.py b/src/exo/backend/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/exo/mem_analysis.py b/src/exo/backend/mem_analysis.py similarity index 98% rename from src/exo/mem_analysis.py rename to src/exo/backend/mem_analysis.py index 0835a199b..39eaf267c 100644 --- a/src/exo/mem_analysis.py +++ b/src/exo/backend/mem_analysis.py @@ -1,7 +1,7 @@ from collections import ChainMap -from .LoopIR import LoopIR +from ..core.LoopIR import LoopIR -from .memory import Memory +from ..core.memory import Memory # --------------------------------------------------------------------------- # diff --git a/src/exo/parallel_analysis.py b/src/exo/backend/parallel_analysis.py similarity index 89% rename from src/exo/parallel_analysis.py rename to src/exo/backend/parallel_analysis.py index 03e070f38..f82ae1aee 100644 --- a/src/exo/parallel_analysis.py +++ b/src/exo/backend/parallel_analysis.py @@ -1,6 +1,6 @@ -from .LoopIR import LoopIR, LoopIR_Rewrite +from ..core.LoopIR import LoopIR, LoopIR_Rewrite -from .new_eff import Check_ParallelizeLoop +from ..rewrite.new_eff import Check_ParallelizeLoop class ParallelAnalysis(LoopIR_Rewrite): diff --git a/src/exo/prec_analysis.py b/src/exo/backend/prec_analysis.py similarity index 99% rename from src/exo/prec_analysis.py rename to src/exo/backend/prec_analysis.py index 19c118435..3d5dac05a 100644 --- a/src/exo/prec_analysis.py +++ b/src/exo/backend/prec_analysis.py @@ -1,4 +1,4 @@ -from .LoopIR import LoopIR, LoopIR_Rewrite, T +from ..core.LoopIR import LoopIR, LoopIR_Rewrite, T # --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- # diff --git a/src/exo/win_analysis.py b/src/exo/backend/win_analysis.py similarity index 97% rename from src/exo/win_analysis.py rename to src/exo/backend/win_analysis.py index 1a8ed77c6..293e63fbb 100644 --- a/src/exo/win_analysis.py +++ b/src/exo/backend/win_analysis.py @@ -1,4 +1,4 @@ -from .LoopIR import LoopIR, T, LoopIR_Rewrite +from ..core.LoopIR import LoopIR, T, LoopIR_Rewrite # --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- # diff --git a/src/exo/LoopIR.py b/src/exo/core/LoopIR.py similarity index 100% rename from src/exo/LoopIR.py rename to src/exo/core/LoopIR.py diff --git a/src/exo/LoopIR_pprint.py b/src/exo/core/LoopIR_pprint.py similarity index 100% rename from src/exo/LoopIR_pprint.py rename to src/exo/core/LoopIR_pprint.py diff --git a/src/exo/core/__init__.py b/src/exo/core/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/exo/configs.py b/src/exo/core/configs.py similarity index 100% rename from src/exo/configs.py rename to src/exo/core/configs.py diff --git a/src/exo/extern.py b/src/exo/core/extern.py similarity index 100% rename from src/exo/extern.py rename to src/exo/core/extern.py diff --git a/src/exo/internal_cursors.py b/src/exo/core/internal_cursors.py similarity index 99% rename from src/exo/internal_cursors.py rename to src/exo/core/internal_cursors.py index 21ed814f7..1d4c98a8f 100644 --- a/src/exo/internal_cursors.py +++ b/src/exo/core/internal_cursors.py @@ -337,7 +337,7 @@ def _delete(self): internal classes and modules, but not from end-user code. """ # TODO: refactor this; LoopIR should not be imported here - from exo.LoopIR import LoopIR + from exo.core.LoopIR import LoopIR pass_stmt = [LoopIR.Pass(self.parent()._node.srcinfo)] return self._replace([], empty_default=pass_stmt) diff --git a/src/exo/memory.py b/src/exo/core/memory.py similarity index 100% rename from src/exo/memory.py rename to src/exo/core/memory.py diff --git a/src/exo/prelude.py b/src/exo/core/prelude.py similarity index 100% rename from src/exo/prelude.py rename to src/exo/core/prelude.py diff --git a/src/exo/proc_eqv.py b/src/exo/core/proc_eqv.py similarity index 100% rename from src/exo/proc_eqv.py rename to src/exo/core/proc_eqv.py diff --git a/src/exo/frontend/__init__.py b/src/exo/frontend/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/exo/boundscheck.py b/src/exo/frontend/boundscheck.py similarity index 99% rename from src/exo/boundscheck.py rename to src/exo/frontend/boundscheck.py index 20eb8dc59..b82bddc93 100644 --- a/src/exo/boundscheck.py +++ b/src/exo/frontend/boundscheck.py @@ -4,8 +4,8 @@ import pysmt from pysmt import shortcuts as SMT -from .LoopIR import LoopIR, T, Operator, Config -from .prelude import * +from ..core.LoopIR import LoopIR, T, Operator, Config +from ..core.prelude import * # --------------------------------------------------------------------------- # diff --git a/src/exo/parse_fragment.py b/src/exo/frontend/parse_fragment.py similarity index 99% rename from src/exo/parse_fragment.py rename to src/exo/frontend/parse_fragment.py index 908c16166..8cb164401 100644 --- a/src/exo/parse_fragment.py +++ b/src/exo/frontend/parse_fragment.py @@ -2,7 +2,7 @@ from collections import ChainMap from . import pyparser -from .LoopIR import T, LoopIR_Do, LoopIR, PAST +from ..core.LoopIR import T, LoopIR_Do, LoopIR, PAST # --------------------------------------------------------------------------- # diff --git a/src/exo/pattern_match.py b/src/exo/frontend/pattern_match.py similarity index 99% rename from src/exo/pattern_match.py rename to src/exo/frontend/pattern_match.py index f3e2131e5..55eca676b 100644 --- a/src/exo/pattern_match.py +++ b/src/exo/frontend/pattern_match.py @@ -5,13 +5,13 @@ from typing import Optional, Iterable from collections import ChainMap -import exo.pyparser as pyparser -from exo.LoopIR import LoopIR, PAST +import exo.frontend.pyparser as pyparser +from exo.core.LoopIR import LoopIR, PAST # --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- # # Pattern Matching Errors -from exo.internal_cursors import Cursor, Node, Block +from exo.core.internal_cursors import Cursor, Node, Block class PatternMatchError(Exception): diff --git a/src/exo/pyparser.py b/src/exo/frontend/pyparser.py similarity index 99% rename from src/exo/pyparser.py rename to src/exo/frontend/pyparser.py index 9edbcbb48..e4c0da9d7 100644 --- a/src/exo/pyparser.py +++ b/src/exo/frontend/pyparser.py @@ -9,11 +9,11 @@ from asdl_adt.validators import ValidationError -from .API_types import ProcedureBase -from .configs import Config -from .LoopIR import UAST, PAST, front_ops -from .prelude import * -from .extern import Extern +from ..API_types import ProcedureBase +from ..core.configs import Config +from ..core.LoopIR import UAST, PAST, front_ops +from ..core.prelude import * +from ..core.extern import Extern # --------------------------------------------------------------------------- # diff --git a/src/exo/syntax.py b/src/exo/frontend/syntax.py similarity index 100% rename from src/exo/syntax.py rename to src/exo/frontend/syntax.py diff --git a/src/exo/typecheck.py b/src/exo/frontend/typecheck.py similarity index 99% rename from src/exo/typecheck.py rename to src/exo/frontend/typecheck.py index b44c39a16..9b27197a7 100644 --- a/src/exo/typecheck.py +++ b/src/exo/frontend/typecheck.py @@ -1,4 +1,4 @@ -from .LoopIR import ( +from ..core.LoopIR import ( T, UAST, LoopIR, @@ -6,8 +6,8 @@ get_writeconfigs, get_loop_iters, ) -from .extern import Extern_Typecheck_Error -from .memory import * +from ..core.extern import Extern_Typecheck_Error +from ..core.memory import * # --------------------------------------------------------------------------- # diff --git a/src/exo/libs/externs.py b/src/exo/libs/externs.py index eb95ddf32..8752ed695 100644 --- a/src/exo/libs/externs.py +++ b/src/exo/libs/externs.py @@ -1,4 +1,4 @@ -from ..extern import Extern, _EErr +from exo.core.extern import Extern, _EErr class _Sin(Extern): diff --git a/src/exo/libs/memories.py b/src/exo/libs/memories.py index b37b11867..8ce892997 100644 --- a/src/exo/libs/memories.py +++ b/src/exo/libs/memories.py @@ -1,4 +1,4 @@ -from ..memory import Memory, DRAM, StaticMemory, MemGenError, generate_offset +from exo.core.memory import Memory, DRAM, StaticMemory, MemGenError, generate_offset def _is_const_size(sz, c): diff --git a/src/exo/LoopIR_scheduling.py b/src/exo/rewrite/LoopIR_scheduling.py similarity index 99% rename from src/exo/LoopIR_scheduling.py rename to src/exo/rewrite/LoopIR_scheduling.py index 317d0f6ed..c67f0ec70 100644 --- a/src/exo/LoopIR_scheduling.py +++ b/src/exo/rewrite/LoopIR_scheduling.py @@ -2,7 +2,7 @@ from collections import ChainMap from typing import List, Tuple, Optional -from .LoopIR import ( +from ..core.LoopIR import ( LoopIR, LoopIR_Rewrite, Alpha_Rename, @@ -35,13 +35,13 @@ from .range_analysis import IndexRangeEnvironment, IndexRange, index_range_analysis -from .prelude import * -from .proc_eqv import get_strictest_eqv_proc -import exo.internal_cursors as ic +from ..core.prelude import * +from ..core.proc_eqv import get_strictest_eqv_proc +import exo.core.internal_cursors as ic import exo.API as api -from .pattern_match import match_pattern -from .memory import DRAM -from .typecheck import check_call_types +from ..frontend.pattern_match import match_pattern +from ..core.memory import DRAM +from ..frontend.typecheck import check_call_types from functools import partial diff --git a/src/exo/LoopIR_unification.py b/src/exo/rewrite/LoopIR_unification.py similarity index 99% rename from src/exo/LoopIR_unification.py rename to src/exo/rewrite/LoopIR_unification.py index ce7d65622..16cf2182d 100644 --- a/src/exo/LoopIR_unification.py +++ b/src/exo/rewrite/LoopIR_unification.py @@ -7,7 +7,7 @@ from asdl_adt import ADT from pysmt import shortcuts as SMT -from .LoopIR import ( +from ..core.LoopIR import ( LoopIR, T, LoopIR_Do, @@ -17,9 +17,9 @@ LoopIR_Dependencies, ) from .LoopIR_scheduling import SchedulingError -from .prelude import * +from ..core.prelude import * from .new_eff import Check_Aliasing -import exo.internal_cursors as ic +import exo.core.internal_cursors as ic def _get_smt_solver(): diff --git a/src/exo/rewrite/__init__.py b/src/exo/rewrite/__init__.py new file mode 100644 index 000000000..e69de29bb diff --git a/src/exo/analysis_simplify.py b/src/exo/rewrite/analysis_simplify.py similarity index 100% rename from src/exo/analysis_simplify.py rename to src/exo/rewrite/analysis_simplify.py diff --git a/src/exo/new_analysis_core.py b/src/exo/rewrite/new_analysis_core.py similarity index 99% rename from src/exo/new_analysis_core.py rename to src/exo/rewrite/new_analysis_core.py index 0fa410f2e..11ed09da2 100644 --- a/src/exo/new_analysis_core.py +++ b/src/exo/rewrite/new_analysis_core.py @@ -11,8 +11,8 @@ from asdl_adt import ADT, validators from asdl_adt.validators import ValidationError -from .LoopIR import T, LoopIR -from .prelude import * +from ..core.LoopIR import T, LoopIR +from ..core.prelude import * _first_run = True diff --git a/src/exo/new_eff.py b/src/exo/rewrite/new_eff.py similarity index 99% rename from src/exo/new_eff.py rename to src/exo/rewrite/new_eff.py index f7fa0e1d5..cf8c5d73a 100644 --- a/src/exo/new_eff.py +++ b/src/exo/rewrite/new_eff.py @@ -2,10 +2,10 @@ from enum import Enum from itertools import chain -from .LoopIR import Alpha_Rename, SubstArgs, LoopIR_Do -from .configs import reverse_config_lookup, Config +from ..core.LoopIR import Alpha_Rename, SubstArgs, LoopIR_Do +from ..core.configs import reverse_config_lookup, Config from .new_analysis_core import * -from .proc_eqv import get_repr_proc +from ..core.proc_eqv import get_repr_proc # --------------------------------------------------------------------------- # # --------------------------------------------------------------------------- # @@ -1570,7 +1570,7 @@ def Shadows(a1, a2): import inspect import textwrap -from .API_types import ProcedureBase +from ..API_types import ProcedureBase class SchedulingError(Exception): diff --git a/src/exo/range_analysis.py b/src/exo/rewrite/range_analysis.py similarity index 99% rename from src/exo/range_analysis.py rename to src/exo/rewrite/range_analysis.py index c84014c60..3b810195b 100644 --- a/src/exo/range_analysis.py +++ b/src/exo/rewrite/range_analysis.py @@ -3,9 +3,9 @@ from dataclasses import dataclass from typing import Optional, Tuple -from .LoopIR import LoopIR, T, LoopIR_Compare +from ..core.LoopIR import LoopIR, T, LoopIR_Compare from .new_eff import Check_ExprBound -from .prelude import Sym, _null_srcinfo_obj +from ..core.prelude import Sym, _null_srcinfo_obj # TODO: we should implement a more general index analysis which diff --git a/src/exo/stdlib/halide_scheduling_ops.py b/src/exo/stdlib/halide_scheduling_ops.py index c5b2fa48f..baf19ad6d 100644 --- a/src/exo/stdlib/halide_scheduling_ops.py +++ b/src/exo/stdlib/halide_scheduling_ops.py @@ -1,7 +1,7 @@ from __future__ import annotations from exo.API_cursors import * -from exo.LoopIR import get_reads_of_expr, LoopIR # TODO: get rid of this +from exo.core.LoopIR import get_reads_of_expr, LoopIR # TODO: get rid of this from .range_analysis import bounds_inference from .scheduling import * diff --git a/src/exo/stdlib/inspection.py b/src/exo/stdlib/inspection.py index cfb98e80a..ad299c4f9 100644 --- a/src/exo/stdlib/inspection.py +++ b/src/exo/stdlib/inspection.py @@ -4,7 +4,7 @@ from exo.libs.memories import * from exo.platforms.x86 import * from exo.platforms.neon import * -from exo.syntax import * +from exo.frontend.syntax import * from exo.API_cursors import * from exo.stdlib.analysis import * diff --git a/src/exo/stdlib/range_analysis.py b/src/exo/stdlib/range_analysis.py index 8334f7e40..ead38f578 100644 --- a/src/exo/stdlib/range_analysis.py +++ b/src/exo/stdlib/range_analysis.py @@ -2,7 +2,7 @@ from typing import Tuple from exo.API_cursors import * -from exo.range_analysis import IndexRange +from exo.rewrite.range_analysis import IndexRange from .inspection import get_parents diff --git a/src/exo/stdlib/rc_wrappers.py b/src/exo/stdlib/rc_wrappers.py index 4d6e9bd56..72982cae5 100644 --- a/src/exo/stdlib/rc_wrappers.py +++ b/src/exo/stdlib/rc_wrappers.py @@ -2,7 +2,7 @@ from dataclasses import dataclass from exo import * -from exo.syntax import * +from exo.frontend.syntax import * from exo.stdlib.scheduling import * from exo.API_cursors import * diff --git a/src/exo/stdlib/scheduling.py b/src/exo/stdlib/scheduling.py index 43e18939c..9e30eb177 100644 --- a/src/exo/stdlib/scheduling.py +++ b/src/exo/stdlib/scheduling.py @@ -96,7 +96,7 @@ from .analysis import check_call_mem_types from ..API_cursors import * -from ..LoopIR_unification import UnificationError as _UnificationError +from ..rewrite.LoopIR_unification import UnificationError as _UnificationError # --------------------------------------------------------------------------- # diff --git a/src/exo/stdlib/stdlib.py b/src/exo/stdlib/stdlib.py index 6900a2dd0..7b3fd4b3a 100644 --- a/src/exo/stdlib/stdlib.py +++ b/src/exo/stdlib/stdlib.py @@ -2,8 +2,7 @@ from dataclasses import dataclass from exo import * -from exo.syntax import * -from exo.API_cursors import * +from exo.frontend.syntax import * from .scheduling import * from .inspection import * diff --git a/tests/amx/test_amx_instr.py b/tests/amx/test_amx_instr.py index b34cbe599..b9226d855 100644 --- a/tests/amx/test_amx_instr.py +++ b/tests/amx/test_amx_instr.py @@ -7,7 +7,7 @@ from exo.stdlib.scheduling import * from .amx import * from .harness_amx import AMXTestBuilder -from exo.memory import MemGenError +from exo.core.memory import MemGenError def reorder_back(proc, pattern): diff --git a/tests/test_error_reporting.py b/tests/test_error_reporting.py index 60874805c..f3126a822 100644 --- a/tests/test_error_reporting.py +++ b/tests/test_error_reporting.py @@ -6,7 +6,7 @@ from exo import SchedulingError from exo import proc -from exo.syntax import * +from exo.frontend.syntax import * from exo.stdlib.scheduling import * # skipping because the API has changed to invalidate this particular diff --git a/tests/test_internal_cursors.py b/tests/test_internal_cursors.py index b7c941f7f..d4c0ef99e 100644 --- a/tests/test_internal_cursors.py +++ b/tests/test_internal_cursors.py @@ -3,17 +3,17 @@ import pytest from exo import proc, SchedulingError, Procedure -from exo.LoopIR import LoopIR, T -from exo.LoopIR_pprint import _print_cursor -from exo.internal_cursors import ( +from exo.core.LoopIR import LoopIR, T +from exo.core.LoopIR_pprint import _print_cursor +from exo.core.internal_cursors import ( Cursor, Block, InvalidCursorError, Node, ) -from exo.pattern_match import match_pattern -from exo.prelude import Sym -from exo.syntax import size, f32 +from exo.frontend.pattern_match import match_pattern +from exo.core.prelude import Sym +from exo.frontend.syntax import size, f32 def _find_cursors(ctx, pattern): diff --git a/tests/test_neon.py b/tests/test_neon.py index ce69364fe..be6819e41 100644 --- a/tests/test_neon.py +++ b/tests/test_neon.py @@ -9,7 +9,7 @@ from exo import proc from exo.platforms.neon import * from exo.stdlib.scheduling import * -from exo.memory import MemGenError +from exo.core.memory import MemGenError import numpy as np diff --git a/tests/test_new_eff.py b/tests/test_new_eff.py index 31f07361c..7f079e4a7 100644 --- a/tests/test_new_eff.py +++ b/tests/test_new_eff.py @@ -2,7 +2,7 @@ import pytest -from exo.new_eff import * +from exo.rewrite.new_eff import * from exo import proc, config, DRAM, SchedulingError from exo.stdlib.scheduling import * diff --git a/tests/test_range_analysis.py b/tests/test_range_analysis.py index bdb371eeb..195eaac22 100644 --- a/tests/test_range_analysis.py +++ b/tests/test_range_analysis.py @@ -2,7 +2,7 @@ from exo.stdlib.scheduling import * from exo import proc -from exo.range_analysis import ( +from exo.rewrite.range_analysis import ( constant_bound, arg_range_analysis, IndexRangeEnvironment, @@ -11,7 +11,7 @@ infer_range, bounds_inference, ) -from exo.LoopIR import LoopIR, T +from exo.core.LoopIR import LoopIR, T def test_affine_index_range(): diff --git a/tests/test_rvv.py b/tests/test_rvv.py index 0f224c5f2..87addc109 100644 --- a/tests/test_rvv.py +++ b/tests/test_rvv.py @@ -9,7 +9,7 @@ from exo import proc from exo.platforms.rvv import * from exo.stdlib.scheduling import * -from exo.memory import MemGenError +from exo.core.memory import MemGenError import numpy as np diff --git a/tests/test_typecheck.py b/tests/test_typecheck.py index b3b3aa442..fe9f86d0a 100644 --- a/tests/test_typecheck.py +++ b/tests/test_typecheck.py @@ -4,7 +4,7 @@ from exo import proc, config from exo.libs.memories import GEMM_SCRATCH -from exo.pyparser import ParseError +from exo.frontend.pyparser import ParseError from exo.libs.externs import * diff --git a/tests/test_uast.py b/tests/test_uast.py index a670e71f5..a5fb69524 100644 --- a/tests/test_uast.py +++ b/tests/test_uast.py @@ -1,7 +1,7 @@ from __future__ import annotations from exo import DRAM -from exo.pyparser import Parser, get_src_locals, get_ast_from_python +from exo.frontend.pyparser import Parser, get_src_locals, get_ast_from_python def to_uast(f):