Skip to content
Draft
Show file tree
Hide file tree
Changes from all commits
Commits
Show all changes
28 commits
Select commit Hold shift + click to select a range
a534fc8
* Added support for printing lowered logic IR to better understand IR
TheRealMichaelWang Sep 8, 2025
e98719a
- Fully implemented Einsum logic node
TheRealMichaelWang Sep 8, 2025
47aedc8
* Simplified union calculation for output fields
TheRealMichaelWang Sep 8, 2025
5905b3b
* Added support for to string to einsum node
TheRealMichaelWang Sep 8, 2025
fb0c097
- Added more patterns to einsum transformer
TheRealMichaelWang Sep 8, 2025
a6470a6
* Removed einprod
TheRealMichaelWang Sep 11, 2025
dd30bcc
* Added comments to Pointwise IR
TheRealMichaelWang Sep 11, 2025
29a9543
* Added bare bones einsum parser (called einsum lowerer) implementati…
TheRealMichaelWang Sep 12, 2025
2f7f951
* Started implementing einsum lowerer.
TheRealMichaelWang Sep 12, 2025
f57a8e4
* Added support for handling Reorder statements
TheRealMichaelWang Sep 12, 2025
f829d04
* Restructured the recursive descent parsing to handle top level plan…
TheRealMichaelWang Sep 12, 2025
3b3ba24
* Added support for printing einsums, pointwise operations, and einsu…
TheRealMichaelWang Sep 12, 2025
fd377cc
* Added support for is_commutative property for operations in algebra.py
TheRealMichaelWang Sep 12, 2025
73af234
* Fixed many, many bugs with EinsumLowerer
TheRealMichaelWang Sep 12, 2025
6eabb03
* Removed unused imports from einsum.py
TheRealMichaelWang Sep 12, 2025
71d7f04
* Added support for printing promote max and promote min reduction op…
TheRealMichaelWang Sep 22, 2025
aa73d5b
* Added support for EinsumInterpreter based Einsum scheduler
TheRealMichaelWang Sep 22, 2025
5afab01
* Added sparse tensor type designed specifically for use with einsum …
TheRealMichaelWang Sep 23, 2025
9318c44
* Added support for SparseTensor type to automatically use einsum sch…
TheRealMichaelWang Sep 23, 2025
4ccef99
Merge branch 'main' of https://github.com/finch-tensor/finch-tensor-l…
TheRealMichaelWang Sep 23, 2025
1fd907b
* Added support for printing sparse tensors
TheRealMichaelWang Sep 23, 2025
e78c733
* Reverted changes to eager.py
TheRealMichaelWang Sep 29, 2025
b52e748
* Added indrect COO access pointwise operation
TheRealMichaelWang Sep 29, 2025
308de67
Merge branch 'main' of https://github.com/finch-tensor/finch-tensor-l…
TheRealMichaelWang Sep 29, 2025
3ff8c38
* Fixed issues with printing einsum interpreter
TheRealMichaelWang Sep 29, 2025
054655f
* Removed redundant input fields property in einsum IR node
TheRealMichaelWang Sep 29, 2025
85d3484
* Added abstract statement IR node for einsum plans
TheRealMichaelWang Sep 29, 2025
7d20a02
* Added support for some indirect einsum operations
TheRealMichaelWang Sep 30, 2025
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
5 changes: 2 additions & 3 deletions src/finchlite/algebra/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -4,6 +4,7 @@
init_value,
is_annihilator,
is_associative,
is_commutative,
is_distributive,
is_idempotent,
is_identity,
Expand Down Expand Up @@ -37,18 +38,16 @@
"TensorFType",
"TensorPlaceholder",
"conjugate",
"conjugate",
"element_type",
"element_type",
"fill_value",
"fill_value",
"first_arg",
"fixpoint_type",
"identity",
"init_value",
"is_annihilator",
"is_associative",
"is_distributive",
"is_commutative",
"is_idempotent",
"is_identity",
"overwrite",
Expand Down
12 changes: 12 additions & 0 deletions src/finchlite/algebra/algebra.py
Original file line number Diff line number Diff line change
Expand Up @@ -345,6 +345,18 @@ def is_associative(op: Any) -> bool:
register_property(np.logical_or, "__call__", "is_associative", lambda op: True)
register_property(np.logical_xor, "__call__", "is_associative", lambda op: True)

# Commutative properties

for op in (operator.add, operator.mul, operator.and_, operator.or_, operator.xor,
np.logical_and, np.logical_or, np.logical_xor):
register_property(op, "__call__", "is_commutative", lambda op: True)

for op in (operator.sub, operator.truediv, operator.floordiv, operator.pow,
operator.lshift, operator.rshift):
register_property(op, "__call__", "is_commutative", lambda op: False)

def is_commutative(op: Any) -> bool:
return query_property(op, "__call__", "is_commutative")

def is_identity(op: Any, val: Any) -> bool:
"""
Expand Down
1 change: 0 additions & 1 deletion src/finchlite/algebra/tensor.py
Original file line number Diff line number Diff line change
Expand Up @@ -6,7 +6,6 @@
from ..algebra import register_property
from ..symbolic import FType, FTyped, ftype


class TensorFType(FType, ABC):
@property
def ndim(self) -> np.intp:
Expand Down
11 changes: 11 additions & 0 deletions src/finchlite/autoschedule/__init__.py
Original file line number Diff line number Diff line change
Expand Up @@ -38,11 +38,21 @@
push_fields,
set_loop_order,
)
from .einsum import (
Einsum,
EinsumPlan,
EinsumCompiler,
EinsumScheduler
)

__all__ = [
"Aggregate",
"Alias",
"DefaultLogicOptimizer",
"Einsum",
"EinsumPlan",
"EinsumCompiler",
"EinsumScheduler",
"Field",
"Literal",
"LogicCompiler",
Expand All @@ -51,6 +61,7 @@
"PostOrderDFS",
"PostWalk",
"PreWalk",
"PrintingLogicOptimizer",
"Produces",
"Query",
"Reformat",
Expand Down
Loading
Loading