jz-tree documentation
Welcome to the documentation of jz-tree!
jz-tree provides GPU-native spatial trees for JAX with a CUDA backend. It includes nearest-neighbour and radius searches, friends-of-friends grouping, experimental kernel density estimation, and custom neighbour reductions. The following comparison measures 30-nearest-neighbour searches in three dimensions on one NVIDIA A100. The figure is from the jz-tree article; see the article for benchmark details.
For additional details, also consider:
The code repository
The arXiv preprint article: arXiv:2604.05885
Jens Stücker’s personal homepage
What’s new in version 1.2
Version 1.2 brings the following changes compared with 1.1; see the changelog for details.
New search and density tools: query_ball finds all neighbours within a supplied radius; KDE estimates weighted densities with fixed or adaptive bandwidths; the custom reductions interface accumulates neighbour contributions without storing full neighbour lists, which can notably reduce memory usage for certain applications, with support for gradients.
Bounding boxes: tree nodes now use fitted bounding boxes instead of Morton cells, improving speed in most cases and making searches less prone to edge cases. Custom tree walks can use these bounds too. Tree regularization stays on by default for kNN, where it still helps strongly concentrated distributions.
Error handling: runtime and allocation errors now raise catchable Python exceptions on single and multiple GPUs, with all ranks raising the same error.
jz.apply_fixandjz.run_with_fixescan increase insufficient allocations automatically.Bug fixes: fix cases in version 1.1 that could silently return wrong FoF groups when many ranks requested particles from the same rank, or wrong kNN neighbours when using separate query points.