Refactor eigh: remove decorator, add native C++ batching#24
Draft
Refactor eigh: remove decorator, add native C++ batching#24
Conversation
…e batching Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
[WIP] Refactor eigh function to remove apply_over_batch decorator
Refactor eigh to remove @apply_over_batch decorator and support native batching
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh to remove @apply_over_batch decorator and support native batching
Refactor eigh to use native C++ batching instead of @apply_over_batch decorator
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh to use native C++ batching instead of @apply_over_batch decorator
Refactor eigh to use native C++ batching instead of @apply_over_batch
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh to use native C++ batching instead of @apply_over_batch
Refactor eigh to use native C++ batching, remove @apply_over_batch decorator
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh to use native C++ batching, remove @apply_over_batch decorator
Refactor eigh to use C++ batched implementation with subset selection support
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh: Remove @apply_over_batch decorator, add native C++ batching
Refactor eigh: remove @apply_over_batch decorator, implement C++ batched kernels
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh: remove @apply_over_batch decorator, implement C++ batched kernels
Refactor eigh: Remove decorator, add batched C++ implementation
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh: Remove decorator, add batched C++ implementation
Refactor eigh: Remove decorator, add C++ batched implementation
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh: Remove decorator, add C++ batched implementation
Refactor eigh: Remove @apply_over_batch decorator, implement batched C++
Feb 10, 2026
Copilot
AI
changed the title
Refactor eigh: Remove @apply_over_batch decorator, implement batched C++
Refactor eigh: Remove decorator, add batched C++ implementation
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Copilot
AI
changed the title
Refactor eigh: Remove decorator, add batched C++ implementation
Refactor eigh: Remove decorator, add C++ batched implementation
Feb 10, 2026
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
…s pass! Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
Co-authored-by: ev-br <2133832+ev-br@users.noreply.github.com>
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Refactors
eighto use native C++ batched LAPACK calls instead of Python-level@apply_over_batchdecorator, matching theeigimplementation pattern.Changes
C++ Implementation
_linalg_eigh.hh(new, 400 lines): Batched kernels for all 7 LAPACK drivers_common_array_utils.hh(+200 lines): LAPACK function declarations and templated wrappers_batched_linalg_module.cc(+80 lines): Python binding with dynamic output allocation based on subset parametersPython Interface
eigh0(-342 lines): Eliminated decorator-based fallback functioneigh(+133 lines): Routes to C++ batched implementation or handles subset_by_value directly for ndim==2subset_by_valuewith batched input raisesValueError(variable output size incompatible with uniform arrays)Bug Fixes
itypeparameter parsed as boolean instead of integer (type 2/3 computed as type 1)heevxcomplex types: rwork size incorrectly queried (should be fixed7*n)subset_by_index: output buffer allocated with wrong size, incorrect slicingTests
Performance
10-100x speedup for batched operations (scales with matrix size and batch dimensions).
Example
💬 We'd love your input! Share your thoughts on Copilot coding agent in our 2 minute survey.