Skip to content

Staging branch for weighted#656

Draft
jfeser wants to merge 10 commits into
masterfrom
staging-weighted
Draft

Staging branch for weighted#656
jfeser wants to merge 10 commits into
masterfrom
staging-weighted

Conversation

@jfeser

@jfeser jfeser commented May 6, 2026

Copy link
Copy Markdown
Contributor

No description provided.

* add monoid module

* clean up

* fix doctest

* fix

* wip

* remove incorrect rule

* add disjoint set tests and fix bug

* lint

* drop jax monoid defs

* drop incorrect comment

* add assert

* reduce nondeterminism and add assertions

* fix inconsistent stream numbering and missing constant factors
@jfeser jfeser force-pushed the staging-weighted branch from 7c22756 to d558162 Compare May 7, 2026 19:20
jfeser added 7 commits May 12, 2026 14:57
* Add monoid module (#653)

* add monoid module

* clean up

* fix doctest

* fix

* wip

* remove incorrect rule

* add disjoint set tests and fix bug

* lint

* drop jax monoid defs

* drop incorrect comment

* add assert

* reduce nondeterminism and add assertions

* fix inconsistent stream numbering and missing constant factors

* wip

* cleanup

* fix rule

* wip

* fix bug

* cleanup

* lin
* Add monoid module (#653)

* add monoid module

* clean up

* fix doctest

* fix

* wip

* remove incorrect rule

* add disjoint set tests and fix bug

* lint

* drop jax monoid defs

* drop incorrect comment

* add assert

* reduce nondeterminism and add assertions

* fix inconsistent stream numbering and missing constant factors

* wip

* cleanup

* fix rule

* wip

* fix bug

* cleanup

* lin

* wip

* fix tests

* format

* lint

* wip
* Add monoid module (#653)

* add monoid module

* clean up

* fix doctest

* fix

* wip

* remove incorrect rule

* add disjoint set tests and fix bug

* lint

* drop jax monoid defs

* drop incorrect comment

* add assert

* reduce nondeterminism and add assertions

* fix inconsistent stream numbering and missing constant factors

* wip

* cleanup

* wip

* fix rule

* wip

* fix bug

* cleanup

* lin

* wip

* fix tests

* format

* lint

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* drop runtime typed dict lifting

* wip

* format

* reorganize

* stop using string dicts to avoid unification issue

* wip

* wip

* wip

* wip

* wip

* use check_rewrite in jax tests

* lint

* fix bugs
* Add monoid module (#653)

* add monoid module

* clean up

* fix doctest

* fix

* wip

* remove incorrect rule

* add disjoint set tests and fix bug

* lint

* drop jax monoid defs

* drop incorrect comment

* add assert

* reduce nondeterminism and add assertions

* fix inconsistent stream numbering and missing constant factors

* wip

* cleanup

* wip

* wip

* fix rule

* wip

* fix bug

* cleanup

* lin

* wip

* fix tests

* format

* lint

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* wip

* drop runtime typed dict lifting

* wip

* format

* reorganize

* stop using string dicts to avoid unification issue

* wip

* wip

* wip

* wip

* wip

* use check_rewrite in jax tests

* lint

* wip

* fix bugs

* comment on not implemented cases

* format

* simplify

* lint

* add matmul test
* more precise stream type

* add tests for weighted rules

* add reduction rule for weighted streams and tests

* add test to demo expectation

* add numpyro monoid module

* add quadrature

* add tests

* wip

* refactor tests

* wip

* test composition of lifting and weighting

* drop numpyro changes

* drop unused ops

* lint

* make weighted a Monoid method

* fix typing of jax arrays

* change weighted typing to take callable

* fix test

* fix test

* resolve type aliases before dispatching

* wip

* wip

* remove typeof_full

* wip

* wip

* wip

* format

* refactor test harness

* drop unused test
* more agressive factorization that hoists shared streams

* reduce nesting

* comment

* replace with simpler push-based rule

* format

* drop unused disjoint set

* remove unused

* push multiple streams instead of one at a time
* more precise stream type

* add tests for weighted rules

* add reduction rule for weighted streams and tests

* add test to demo expectation

* add numpyro monoid module

* add quadrature

* add tests

* wip

* refactor tests

* wip

* test composition of lifting and weighting

* drop numpyro changes

* drop unused ops

* lint

* make weighted a Monoid method

* fix typing of jax arrays

* change weighted typing to take callable

* fix test

* fix test

* resolve type aliases before dispatching

* wip

* wip

* remove typeof_full

* wip

* wip

* wip

* format

* refactor test harness

* fix behavior of delta terms

* add baseline einsum

* rework einsum to work on shapes instead of concrete tensors

* add einsum benchmark

* wip

* wip

* finish sum/product contraction

* allow bind_dims to bind nonexistent named dimensions

* wip

* add custom partial eval for reductions

* working benchmarks

* fix infinite loop

* eliminate identity indexing when possible

* wip

* handle getitem where dimensions are created

* treat any index with bare ops and slice(None) as canonical

* simplify range op and add reduction rules

* wip

* remove old benchmark code

* another try at removing identity gathers

* refactor

* fix test

* lint

* clean up comment

* fix some test failures

* drop sketchy bind_dims rule

* drop more type-incompatible plus rules

* format

* fix reduction issue

* drop dimension creating behavior from bind_dims

* lint

* simplify comment

* drop partition

* fix docstring

* handle negative dimension indexing

* fix creation of empty tensors

* fully restore previous behavior for missing named dims

* reduce any arraylike or named tensor

* require at least one jax array to reduce

* fix typing test

* drop typing test

* drop einsum parser in favor of opt_einsum

* more agressive factorization that hoists shared streams

* reduce nesting

* comment

* replace with simpler push-based rule

* format

* drop unused disjoint set

* remove unused

* push multiple streams instead of one at a time

* drop contraction ordering handler

* fold BindDimsBindDims into default behavior

* handle Sum.reduce instead of Monoid.reduce

* wip

* wip

* hacks

* extract contraction heuristic

* lint

* fix test

* use a named dimension einsum for contractions

* lint

* drop custom arange op

* wip

* simplify by targetting delta rules

* wip

* fixes

* fixes

* lint

* drop unused

* pick up constants but not rest of module

* lint
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants