Skip to content

Multi-res grid refinement + Neon backend support#159

Open
hsalehipour wants to merge 264 commits intoAutodesk:mainfrom
hsalehipour:dev
Open

Multi-res grid refinement + Neon backend support#159
hsalehipour wants to merge 264 commits intoAutodesk:mainfrom
hsalehipour:dev

Conversation

@hsalehipour
Copy link
Collaborator

Contributing Guidelines

Description

Grid refinement capability is now supported in XLB through the Neon backend. The Neon backend provides full support for dense grids on multi-GPU systems, as well as multi-resolution grids on single GPUs. All newly introduced functionalities have been carefully tested and optimized. This represents a major enhancement to the library and involves substantial additions and improvements to the codebase.

Type of change

  • Bug fix (non-breaking change which fixes an issue)
  • New feature (non-breaking change which adds functionality)
  • Breaking change (fix or feature that would cause existing functionality to not work as expected)
  • Documentation update

How Has This Been Tested?

  • All pytest tests pass
============================================= test session starts ==============================================
platform linux -- Python 3.12.3, pytest-9.0.2, pluggy-1.6.0
rootdir: /home/max/repo/test/XLB
collected 93 items                                                                                             

tests/boundary_conditions/bc_equilibrium/test_bc_equilibrium_jax.py ....                                 [  4%]
tests/boundary_conditions/bc_equilibrium/test_bc_equilibrium_warp.py ....                                [  8%]
tests/boundary_conditions/bc_fullway_bounce_back/test_bc_fullway_bounce_back_jax.py ......               [ 15%]
tests/boundary_conditions/bc_fullway_bounce_back/test_bc_fullway_bounce_back_warp.py ......              [ 21%]
tests/boundary_conditions/mask/test_bc_indices_masker_jax.py .......                                     [ 29%]
tests/boundary_conditions/mask/test_bc_indices_masker_warp.py ......                                     [ 35%]
tests/grids/test_grid_jax.py .......                                                                     [ 43%]
tests/grids/test_grid_warp.py ....                                                                       [ 47%]
tests/kernels/collision/test_bgk_collision_jax.py ......                                                 [ 53%]
tests/kernels/collision/test_bgk_collision_warp.py ......                                                [ 60%]
tests/kernels/equilibrium/test_equilibrium_jax.py ......                                                 [ 66%]
tests/kernels/equilibrium/test_equilibrium_warp.py ......                                                [ 73%]
tests/kernels/macroscopic/test_macroscopic_jax.py ......                                                 [ 79%]
tests/kernels/macroscopic/test_macroscopic_warp.py .......                                               [ 87%]
tests/kernels/stream/test_stream_jax.py ......                                                           [ 93%]
tests/kernels/stream/test_stream_warp.py ......                                                          [100%]

======================================== 93 passed in 248.34s (0:04:08) ========================================

Linting and Code Formatting

Make sure the code follows the project's linting and formatting standards. This project uses Ruff for linting.

To run Ruff, execute the following command from the root of the repository:

ruff check .
  • Ruff passes

hsalehipour and others added 29 commits October 14, 2025 09:36
Unit conversion and Ahmed benchmark
Simplifies the `add_to_app` method in the multiresolution stepper.
It now leverages keyword arguments and introspection for more flexible and maintainable operator calls.
This change enhances code readability and reduces the risk of errors when adding new operators.
(perf) Introduce two new scheduling strategies for the MRES algorithm
Merged and resolved conflicts of the latest XLB/main into dev
…So no need to further multiply by rho in KBC.
…mplifying the function signatures across multiple classes.
* Fixed some runtime bugs

* fixed some naming/spelling errors

* removed some debugging comments.

* Introduced a new file `cell_type.py` containing boundary-mask constants for fluid voxelss to replace hardcoded values with the new constants.

* Applied renaming of 254 to SFV to function names
- Unified multi-resolution recursion builder in `simulation_manager.py` to streamline the construction of simulation steps.
- Refactored nse_multires_stepper for improved clarity
- Updated performance optimization handling in `multires_momentum_transfer.py` to support multiple fusion strategies.
…ine and clarify the implementation of multi-resolution streaming steps.
(refactoring) Cleaning up multi-res stepper.
… multi-res by ensuring consistent use of `store_dtype` and `compute_dtype`.
Fixed mixed precision handling of the Neon backend
@hsalehipour hsalehipour requested a review from mehdiataei March 13, 2026 22:13
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.

4 participants