Skip to content

add JAX backend (runs Shima example!) + improve backend/attribute tests coverage + add skip_division_by_m0 to spectrum moments (not yet in ThrustRTC); phase out Python 3.10 and Intel macOS on CI; phase out Storage::__getitem__(); Numpy 2.0 compatibility - #1732

Merged
slayoo merged 110 commits into
open-atmos:mainfrom
Bodzio-2:konrad_bodzioch/JAX_Backend
Aug 11, 2026

Conversation

@Bodzio-2

Copy link
Copy Markdown
Collaborator

New draft backend class consisting of stripped Numba backend code sufficient to run the tutorial collision example.

@Bodzio-2
Bodzio-2 force-pushed the konrad_bodzioch/JAX_Backend branch from 17c49ef to 6b93127 Compare February 19, 2026 14:34
@slayoo slayoo changed the title backends: add JAX backend class (stripped) backends: add basic JAX backend class (storage + moments methods implemented) + improve moments-methods unit tests Feb 19, 2026
@Bodzio-2 Bodzio-2 closed this Feb 19, 2026
@Bodzio-2 Bodzio-2 reopened this Feb 19, 2026
@codecov

codecov Bot commented Aug 7, 2026

Copy link
Copy Markdown

Codecov Report

❌ Patch coverage is 97.96840% with 9 lines in your changes missing coverage. Please review.
✅ Project coverage is 87.47%. Comparing base (efe63b7) to head (c08a994).
⚠️ Report is 1 commits behind head on main.

Files with missing lines Patch % Lines
PySDM/backends/impl_jax/storage.py 92.59% 6 Missing ⚠️
...DM/backends/impl_jax/methods/collisions_methods.py 98.71% 1 Missing ⚠️
PySDM/backends/jax.py 95.45% 1 Missing ⚠️
PySDM/products/impl/spectrum_moment_product.py 50.00% 1 Missing ⚠️
Additional details and impacted files
@@            Coverage Diff             @@
##             main    #1732      +/-   ##
==========================================
+ Coverage   87.07%   87.47%   +0.39%     
==========================================
  Files         420      430      +10     
  Lines       10751    11158     +407     
==========================================
+ Hits         9361     9760     +399     
- Misses       1390     1398       +8     

☔ View full report in Codecov by Harness.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

extensive_attribute_storage,
extensive_keys,
)
# print(f"{extensive_attribute_storage.data=}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug leftover

Comment thread PySDM/particulator.py Outdated

ranks = self.backend.Storage.from_ndarray(np.array(ranks, dtype=float))

# print("Attr name: " + attr_name)

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug leftover

timestep=timestep,
dv=dv,
)
# assert (prob.to_ndarray() > 0.44).all()

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug leftover?


# act
idx.length = length
# print(f"{cell_start.data=}")

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

debug leftovers

ff = self.formulae

# @jax.jit
# TODO #1913: fix test fails for this method

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

is this still an issue?

Comment thread PySDM/formulae.py
def _boost(obj, fastmath, constants, dimensional_analysis):
"""returns JIT-compiled, `c_inline`-equipped formulae with the constants catalogue attached"""
"""returns JIT-compiled, `c_inline`-equipped formulae with the constants catalogue attached
additionally, adds `jax` attribute for jax.jit compiling of formulae

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

let's add a basic unit test exemplifying the jax() fun

@slayoo slayoo changed the title backends: add JAX backend (all what's needed to run Shima example) + improve moments-methods unit tests + add skip_division_by_m0 to spectrum moments (not yet in ThrustRTC); phase out Python 3.10 and Intel macOS on CI; phase out Storage::__getitem__() add JAX backend (runs Shima example!) + improve backend/attribute tests coverage + add skip_division_by_m0 to spectrum moments (not yet in ThrustRTC); phase out Python 3.10 and Intel macOS on CI; phase out Storage::__getitem__(); Numpy 2.0 compatibility Aug 11, 2026
@slayoo
slayoo merged commit c7e58cb into open-atmos:main Aug 11, 2026
96 checks passed
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

Projects

None yet

Development

Successfully merging this pull request may close these issues.

3 participants