Skip to content

Commit f8066f7

Browse files
committed
Move to runtime submodule
1 parent 7808e51 commit f8066f7

File tree

4 files changed

+8
-5
lines changed

4 files changed

+8
-5
lines changed

examples/mlir/memref_management.py

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,8 @@
99
from mlir.execution_engine import ExecutionEngine
1010
from mlir.passmanager import PassManager
1111

12-
import lighthouse.utils as lh_utils
12+
from lighthouse import runtime as lh_runtime
13+
from lighthouse import utils as lh_utils
1314

1415

1516
def create_mlir_module(shape: list[int]) -> ir.Module:
@@ -45,7 +46,7 @@ def lower_to_llvm(operation: ir.Operation) -> None:
4546
def main():
4647
# Validate basic functionality.
4748
print("Testing memref allocator...")
48-
mem = lh_utils.MemRefManager()
49+
mem = lh_runtime.MemRefManager()
4950
# Check allocation.
5051
buf = mem.alloc(32, 8, 16, ctype=ctypes.c_float)
5152
assert buf.allocated != 0, "Invalid allocation"

lighthouse/runtime/__init__.py

Lines changed: 5 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,5 @@
1+
from .memref_manager import MemRefManager
2+
3+
__all__ = [
4+
"MemRefManager",
5+
]

lighthouse/utils/__init__.py

Lines changed: 0 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -1,7 +1,5 @@
11
"""A collection of utility tools"""
22

3-
from .memref_manager import MemRefManager
4-
53
from .runtime_args import (
64
get_packed_arg,
75
memref_to_ctype,
@@ -12,7 +10,6 @@
1210
)
1311

1412
__all__ = [
15-
"MemRefManager",
1613
"get_packed_arg",
1714
"memref_to_ctype",
1815
"memrefs_to_packed_args",

0 commit comments

Comments
 (0)