[WIP] Prepare for pykeops ranges#53
Open
Leguark wants to merge 15 commits intooptimize_evaluationfrom
Open
Conversation
This was referenced Mar 13, 2026
Member
Author
|
Warning This pull request is not mergeable via GitHub because a downstack PR is open. Once all requirements are satisfied, merge this PR as a stack on Graphite.
This stack of pull requests is managed by Graphite. Learn more about stacking. |
This was referenced Mar 13, 2026
f3de5d0 to
be4c916
Compare
ce1ebe1 to
27415eb
Compare
…for improved performance
- Added `_build_stacked_kernel_data` to concatenate kernel inputs across fields for efficient evaluation. - Integrated scalar kernel creation logic with `create_scalar_kernel`. - Enabled PyKeOps backend by default in `_stack_ops` and tests configuration. - Refactored kernel evaluation logic in `symbolic_evaluator` to support stacked kernel inputs.
…r functions - Deleted the `symbolic_evaluator_optimized` function and redundant block-sparse range builders to streamline the codebase. - Cleaned up unused logic and comments for better maintainability and clarity.
- Added `None` check in `symbolic_evaluator` to prevent unnecessary processing of empty inputs. - Enhanced field concatenation logic to handle non-ndarray values gracefully. - Updated test configuration to enable `mesh_extraction` by default for better test coverage.
…sor handling - Added `torch` for enhanced tensor operations within `symbolic_evaluator`. - Replaced `numpy` operations with `BackendTensor.t` for compatibility with PyTorch. - Enhanced exception handling for lazy tensor operations with PyKeOps. - Improved splitting and concatenation logic for flexibility across tensor backends.
- Implemented parallelization for gradient preparation using `ThreadPoolExecutor`. - Improved tensor handling by enforcing contiguity and moving tensors to GPU asynchronously where applicable. - Refactored `_stack_sub_struct` for cleaner GPU and backend support. - Replaced redundant logic with generalized and scalable approaches for efficiency.
27415eb to
5e404d9
Compare
… interpolation - Introduced a new `GEMPY_FLAT_STACKS` environment variable to control the interpolation strategy dynamically. - Updated `_multi_scalar_field_manager` to support conditional stack selection based on the environment variable. - Removed unused commented code in `_stack_ops` for improved readability.
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.

[WIP] Prepare for pykeops ranges
[WIP] foo
[ENH] Replace
_evaluatewith_evaluate_optimizedin_stack_opsfor improved performance[ENH] Implement kernel stacking and enable PyKeOps backend
_build_stacked_kernel_datato concatenate kernel inputs across fields for efficient evaluation.create_scalar_kernel._stack_opsand tests configuration.symbolic_evaluatorto support stacked kernel inputs.[ENH] Ranges working
[CLN] Remove unused
symbolic_evaluator_optimizedand outdated helper functionssymbolic_evaluator_optimizedfunction and redundant block-sparse range builders to streamline the codebase.[CLN] Simplify field concatenation logic in
symbolic_evaluator[WIP]
[ENH] Improve symbolic evaluator handling and update test configuration
Nonecheck insymbolic_evaluatorto prevent unnecessary processing of empty inputs.mesh_extractionby default for better test coverage.[ENH] Integrate torch backend into symbolic evaluator and improve tensor handling
torchfor enhanced tensor operations withinsymbolic_evaluator.numpyoperations withBackendTensor.tfor compatibility with PyTorch.[CLN] Inline backend string retrieval in symbolic evaluator
[ENH] Parallelize stacking
[ENH] Parallelize gradient preparation and enhance GPU tensor handling
ThreadPoolExecutor._stack_sub_structfor cleaner GPU and backend support.