Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
27 commits
Select commit Hold shift + click to select a range
efe4ccb
sample mlir generation and runnable
SamSJackson Jun 19, 2026
39930f6
demo to satisfy
SamSJackson Jun 19, 2026
94e9c15
building plan and stepping through loopy.py to see inputs
SamSJackson Jul 8, 2026
285db41
designing make_kernel function
SamSJackson Jul 14, 2026
a081fa7
incorporating mlir -> loopy flag and building pymbolic to mlir pipeline
SamSJackson Jul 20, 2026
8b4f6d8
MLIR generating stage - but MLIR typing is incorrect, need type infer…
SamSJackson Jul 21, 2026
8a94094
refactoring pyop3/lower && integrating MLIR
SamSJackson Aug 24, 2026
f50a0f7
introducing dtypes for type-inference and testing case
SamSJackson Aug 24, 2026
b573e66
push before connorjward/pyop3 merge update attempt
SamSJackson Aug 24, 2026
4c5bac4
Merge branch 'connorjward/pyop3' into SamSJackson/pyop3-mlir
SamSJackson Aug 25, 2026
3358de0
Updating lowering paths for new context class
SamSJackson Aug 25, 2026
5a1f473
folder for testing with mlir files
SamSJackson Aug 25, 2026
134d0cb
bug fixed, delayed dtype integration
SamSJackson Aug 25, 2026
8f18475
removing debugging python/text files
SamSJackson Aug 25, 2026
c569f30
cleaning up refactor, to add docstrings
SamSJackson Aug 26, 2026
28ea6c9
removing testing files from git
SamSJackson Aug 26, 2026
ea0996f
removing offloading demo files from remote
SamSJackson Aug 26, 2026
950ff8e
removing mlir class for merge
SamSJackson Aug 26, 2026
6090c48
adding docstrings
SamSJackson Aug 26, 2026
bf47636
removing dtype method for future pr
SamSJackson Aug 26, 2026
6a18af4
removing debug flags
SamSJackson Aug 26, 2026
e6b37d5
removing unnecessary requirements-build update
SamSJackson Aug 26, 2026
0fcd377
returning requirements.txt
SamSJackson Aug 26, 2026
f82365b
resolving simple PR comments
SamSJackson Aug 27, 2026
b45bbf7
moving _compile to codegen
SamSJackson Aug 27, 2026
4a2d5ab
abstracting backend from pyop3 language
SamSJackson Aug 27, 2026
af7d47e
moving petsc_mat and exscan to codegen
SamSJackson Aug 27, 2026
File filter

Filter by extension

Filter by extension


Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
3 changes: 1 addition & 2 deletions pyop3/expr/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -15,7 +15,6 @@
from pyop3.axis_tree import UNIT_AXIS_TREE, AxisTree
from pyop3.node import Node, Terminal


class Expression(Node, abc.ABC):

# {{{ abstract methods
Expand Down Expand Up @@ -333,7 +332,7 @@ def local_min(self) -> numbers.Number:
from pyop3.expr.visitors import get_local_min

return get_local_min(self.a) + get_local_min(self.b)

# }}}


Expand Down
6 changes: 4 additions & 2 deletions pyop3/insn/exec.py
Original file line number Diff line number Diff line change
Expand Up @@ -56,6 +56,8 @@ class CompilerParameters:

# TODO: handle these - need to build CompilerOptions

backend: str = "loopy"
""" Option to select 'loopy' or 'mlir' as code generation backends. """
# extra_cflags: tuple[str, ...] = ()
# extra_ldflags: tuple[str, ...] = ()

Expand Down Expand Up @@ -228,7 +230,7 @@ def compile(self) -> Callable[[int, ...], None]:
)
def _compile(self) -> CompiledCodeExecutor:
from pyop3.insn.visitors import collect_compiler_options
from pyop3.lower.loopy import _compile_static
from pyop3.lower.codegen import _compile_static

# Preprocess the instruction. This is an expensive operation so we
# want to avoid doing it if at all possible.
Expand Down Expand Up @@ -683,7 +685,7 @@ def _(self, arr: np.ndarray, /) -> int:
try:
import cupy as cp

@_handle_to_pointer.register
@_handle_to_pointer.register(cp.ndarray)
def _(self, arr: cp.ndarray, /) -> int:
# NOTE: This gives a pointer to a GPU memory address.
# Loopy cannot work with GPU so this will lead to a segfault.
Expand Down
Loading
Loading