Skip to content

Api enhacements#3

Merged
TobiBu merged 7 commits intomainfrom
API-enhacements
Feb 27, 2026
Merged

Api enhacements#3
TobiBu merged 7 commits intomainfrom
API-enhacements

Conversation

@TobiBu
Copy link
Copy Markdown
Owner

@TobiBu TobiBu commented Feb 27, 2026

some clean up of the API for better interfacing with ODISSEO

Tobias Buck added 7 commits February 24, 2026 10:41
- Updated max_leaf_size handling to use a correctness-preserving upper bound in JIT paths.
- Refactored FMMPreparedState from NamedTuple to a frozen dataclass, enabling better integration with JAX's pytree utilities.
- Implemented tree_flatten and tree_unflatten methods for FMMPreparedState to manage auxiliary data and ensure compatibility with JAX transformations.
- Added utility function _contains_tracer to check for JAX tracer values in inputs.
- Modified FastMultipoleMethod to support stateful caching, preventing tracer leakage into solver caches.
- Introduced tests to validate JIT execution of prepared states and ensure no tracer leakage occurs during computations.
… configurations

- Introduced `compare_yggdrax_jaccpot_prepare.py` to benchmark tree/traversal timings between yggdrax and jaccpot.
- Added default traversal configuration for kdtree in jaccpot's FMM implementation.
- Updated FMM to support adaptive tree build mode.
- Changed fast preset to use lbvh tree build mode instead of fixed depth.
- Modified integration test to reflect changes in fast preset defaults.
…support

- Introduced local functions to encapsulate computation logic within the `_compute_leaf_p2p_impl` function, enhancing readability and maintainability.
- Utilized `lax.cond` to conditionally execute computations based on the validity of edges, optimizing performance by avoiding unnecessary calculations.
- Added new constants for tracing configurations in `_fmm_impl.py` to limit maximum neighbors and interactions per node during tracing, preventing overflow and improving efficiency.
- Implemented a method to resolve tracing traversal configurations, ensuring that the system adapts to different operational contexts while maintaining performance.
- Adjusted leaf capacity handling to ensure consistency between eager and traced modes, enhancing overall stability and performance of the Fast Multipole Method.
@TobiBu TobiBu merged commit 53320f0 into main Feb 27, 2026
1 of 4 checks passed
@TobiBu TobiBu deleted the API-enhacements branch March 16, 2026 12:16
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.

1 participant