pmpp 0.2.1__tar.gz → 0.2.2__tar.gz

This diff represents the content of publicly available package versions that have been released to one of the supported registries. The information contained in this diff is provided for informational purposes only and reflects changes between package versions as they appear in their respective public registries.
Files changed (65) hide show
  1. {pmpp-0.2.1 → pmpp-0.2.2}/PKG-INFO +4 -4
  2. {pmpp-0.2.1 → pmpp-0.2.2}/README.md +2 -2
  3. {pmpp-0.2.1 → pmpp-0.2.2}/cuda/build_cuda_routing.py +51 -48
  4. {pmpp-0.2.1 → pmpp-0.2.2}/cuda/route_kernels.cu +1137 -161
  5. {pmpp-0.2.1 → pmpp-0.2.2}/pyproject.toml +5 -8
  6. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/__init__.py +1 -1
  7. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cic/pallas.py +2 -2
  8. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/core/configuration.py +3 -3
  9. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/build_cuda.py +17 -3
  10. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/configuration.py +4 -2
  11. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/cuda.py +208 -34
  12. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/fft.py +10 -3
  13. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/routing.py +360 -102
  14. pmpp-0.2.2/src/pmpp/initial_conditions/__init__.py +8 -0
  15. pmpp-0.2.2/src/pmpp/initial_conditions/lpt.py +549 -0
  16. pmpp-0.2.2/src/pmpp/nbody/__init__.py +22 -0
  17. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/nbody/gravity.py +94 -2
  18. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/nbody/integrator.py +66 -7
  19. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/nbody/particles.py +17 -1
  20. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/nbody/solver.py +151 -2
  21. pmpp-0.2.1/src/pmpp/initial_conditions/__init__.py +0 -6
  22. pmpp-0.2.1/src/pmpp/initial_conditions/lpt.py +0 -264
  23. pmpp-0.2.1/src/pmpp/nbody/__init__.py +0 -19
  24. {pmpp-0.2.1 → pmpp-0.2.2}/.gitignore +0 -0
  25. {pmpp-0.2.1 → pmpp-0.2.2}/LICENSE +0 -0
  26. {pmpp-0.2.1 → pmpp-0.2.2}/THIRD_PARTY_NOTICES.md +0 -0
  27. {pmpp-0.2.1 → pmpp-0.2.2}/cuda/CMakeLists.txt +0 -0
  28. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/analysis/__init__.py +0 -0
  29. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/analysis/plotting.py +0 -0
  30. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/analysis/power_spectrum.py +0 -0
  31. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cic/__init__.py +0 -0
  32. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cic/enmesh.py +0 -0
  33. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cic/gather.py +0 -0
  34. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cic/scatter.py +0 -0
  35. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/core/__init__.py +0 -0
  36. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/core/utils.py +0 -0
  37. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/__init__.py +0 -0
  38. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/combined.py +0 -0
  39. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/common.py +0 -0
  40. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/core.py +0 -0
  41. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/local_pair.py +0 -0
  42. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/mesh_cnn.py +0 -0
  43. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/nbody.py +0 -0
  44. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/pgd.py +0 -0
  45. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/radial.py +0 -0
  46. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/softening.py +0 -0
  47. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/corrections/window.py +0 -0
  48. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cosmology/__init__.py +0 -0
  49. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cosmology/boltzmann.py +0 -0
  50. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cosmology/growth.py +0 -0
  51. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/cosmology/models.py +0 -0
  52. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/__init__.py +0 -0
  53. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/_cuda_paths.py +0 -0
  54. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/distributed/mesh_halo.py +0 -0
  55. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/extras/__init__.py +0 -0
  56. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/extras/camels/__init__.py +0 -0
  57. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/extras/camels/io.py +0 -0
  58. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/extras/quijote/__init__.py +0 -0
  59. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/extras/quijote/io.py +0 -0
  60. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/extras/quijote/metrics.py +0 -0
  61. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/initial_conditions/modes.py +0 -0
  62. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/nbody/observers.py +0 -0
  63. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/numerics/__init__.py +0 -0
  64. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/numerics/fft.py +0 -0
  65. {pmpp-0.2.1 → pmpp-0.2.2}/src/pmpp/numerics/ode.py +0 -0
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.4
2
2
  Name: pmpp
3
- Version: 0.2.1
3
+ Version: 0.2.2
4
4
  Summary: PM++: a JAX-based differentiable multi-GPU Particle-Mesh cosmology simulator.
5
5
  Project-URL: Homepage, https://github.com/rouzib/PMpp
6
6
  Project-URL: Repository, https://github.com/rouzib/PMpp
@@ -22,7 +22,7 @@ Classifier: Topic :: Scientific/Engineering :: Astronomy
22
22
  Classifier: Topic :: Scientific/Engineering :: Physics
23
23
  Requires-Python: >=3.10
24
24
  Requires-Dist: h5py>=3.10
25
- Requires-Dist: jax<0.11,>=0.6
25
+ Requires-Dist: jax<0.11,>=0.9.1
26
26
  Requires-Dist: matplotlib>=3.8
27
27
  Requires-Dist: mcfit>=0.0.18
28
28
  Provides-Extra: dev
@@ -67,8 +67,8 @@ distributed ownership, mesh-halo, and FFT paths.
67
67
 
68
68
  ## Installation
69
69
 
70
- PM++ supports JAX 0.6 through 0.10 (declared as `jax>=0.6,<0.11`). Install the
71
- JAX build for your accelerator and driver first by following the official
70
+ PM++ supports JAX 0.9.1 through 0.10 (declared as `jax>=0.9.1,<0.11`). Install
71
+ the JAX build for your accelerator and driver first by following the official
72
72
  [JAX installation guide](https://docs.jax.dev/en/latest/installation.html).
73
73
 
74
74
  On a computer with two visible GPUs:
@@ -20,8 +20,8 @@ distributed ownership, mesh-halo, and FFT paths.
20
20
 
21
21
  ## Installation
22
22
 
23
- PM++ supports JAX 0.6 through 0.10 (declared as `jax>=0.6,<0.11`). Install the
24
- JAX build for your accelerator and driver first by following the official
23
+ PM++ supports JAX 0.9.1 through 0.10 (declared as `jax>=0.9.1,<0.11`). Install
24
+ the JAX build for your accelerator and driver first by following the official
25
25
  [JAX installation guide](https://docs.jax.dev/en/latest/installation.html).
26
26
 
27
27
  On a computer with two visible GPUs:
@@ -19,7 +19,6 @@ import shutil
19
19
  import subprocess
20
20
  import sys
21
21
 
22
-
23
22
  ROOT = Path(__file__).resolve().parents[1]
24
23
 
25
24
 
@@ -31,10 +30,11 @@ def _query(command, *, cwd=None):
31
30
 
32
31
 
33
32
  def _write_manifest(build_dir: Path, python: str, architectures: str):
34
- artifact = next(
35
- (candidate for candidate in (build_dir / "libpmpp_cuda_routing.so", build_dir / "pmpp_cuda_routing.so") if candidate.exists()),
36
- None,
37
- )
33
+ artifact = next((
34
+ candidate for candidate in (build_dir / "libpmpp_cuda_routing.so", build_dir / "pmpp_cuda_routing.so")
35
+ if candidate.exists()
36
+ ), None,
37
+ )
38
38
  jax_version = _query([python, "-c", "import jax; print(jax.__version__)"])
39
39
  jaxlib_version = _query([python, "-c", "import jaxlib; print(jaxlib.__version__)"])
40
40
  source_checkout = (ROOT / ".git").exists()
@@ -48,36 +48,48 @@ def _write_manifest(build_dir: Path, python: str, architectures: str):
48
48
  if artifact is not None:
49
49
  artifact_hash = hashlib.sha256(artifact.read_bytes()).hexdigest()
50
50
  manifest = {
51
- "build_identifier": artifact_hash[:16] if artifact_hash else None,
52
- "compiler": _query(["nvcc", "--version"]),
53
- "cuda_toolkit": _query(["nvcc", "--version"]),
54
- "pmpp_commit": commit,
55
- "pmpp_dirty": dirty,
56
- "pmpp_version": pmpp_version,
57
- "jax_version": jax_version,
58
- "jaxlib_version": jaxlib_version,
51
+ "build_identifier":
52
+ artifact_hash[:16] if artifact_hash else None,
53
+ "compiler":
54
+ _query(["nvcc", "--version"]),
55
+ "cuda_toolkit":
56
+ _query(["nvcc", "--version"]),
57
+ "pmpp_commit":
58
+ commit,
59
+ "pmpp_dirty":
60
+ dirty,
61
+ "pmpp_version":
62
+ pmpp_version,
63
+ "jax_version":
64
+ jax_version,
65
+ "jaxlib_version":
66
+ jaxlib_version,
59
67
  "embedded_cuda_architectures": [part for part in architectures.split(";") if part],
60
- "build_timestamp_utc": datetime.now(timezone.utc).isoformat(),
61
- "record_format_version": 2,
62
- "record_words_by_dtype": {"float32": 8, "float64": 14},
68
+ "build_timestamp_utc":
69
+ datetime.now(timezone.utc).isoformat(),
70
+ "record_format_version":
71
+ 3,
72
+ "routing_key_format":
73
+ "uint64_le_limbs",
74
+ "features": ["wide_keys", "int16_bidir", "lean_primal_merge", "fused_drift_primal_i16_f32", ],
75
+ "record_words_by_dtype": {
76
+ "float32": 8,
77
+ "float64": 14
78
+ },
63
79
  "particle_float_dtypes": ["float32", "float64"],
64
- "artifact": None if artifact is None else artifact.name,
65
- "artifact_sha256": artifact_hash,
80
+ "artifact":
81
+ None if artifact is None else artifact.name,
82
+ "artifact_sha256":
83
+ artifact_hash,
66
84
  "routing_targets": [
67
- "pmpp_route_pack",
68
- "pmpp_route_merge",
69
- "pmpp_route_merge_aux",
70
- "pmpp_route_transpose_split",
71
- "pmpp_route_transpose_scatter",
72
- "pmpp_route_bidir_pack",
73
- "pmpp_route_merge_bidir",
74
- "pmpp_route_pack_f64",
75
- "pmpp_route_merge_f64",
76
- "pmpp_route_merge_aux_f64",
77
- "pmpp_route_transpose_split_f64",
78
- "pmpp_route_transpose_scatter_f64",
79
- "pmpp_route_bidir_pack_f64",
80
- "pmpp_route_merge_bidir_f64",
85
+ "pmpp_route_offset_probe", "pmpp_route_pack", "pmpp_route_merge", "pmpp_route_merge_aux",
86
+ "pmpp_route_transpose_split", "pmpp_route_transpose_scatter", "pmpp_route_bidir_pack",
87
+ "pmpp_route_merge_bidir", "pmpp_route_bidir_pack_i16", "pmpp_route_merge_bidir_i16",
88
+ "pmpp_route_merge_bidir_primal_i16", "pmpp_route_bidir_drift_pack_primal_i16",
89
+ "pmpp_route_bidir_drift_merge_primal_i16", "pmpp_route_pack_f64", "pmpp_route_merge_f64",
90
+ "pmpp_route_merge_aux_f64", "pmpp_route_transpose_split_f64", "pmpp_route_transpose_scatter_f64",
91
+ "pmpp_route_bidir_pack_f64", "pmpp_route_merge_bidir_f64", "pmpp_route_bidir_pack_f64_i16",
92
+ "pmpp_route_merge_bidir_f64_i16",
81
93
  ],
82
94
  }
83
95
  manifest_path = build_dir / "pmpp_cuda_routing.manifest.json"
@@ -100,22 +112,13 @@ def main() -> int:
100
112
  shutil.rmtree(build_dir)
101
113
  build_dir.mkdir(parents=True, exist_ok=True)
102
114
  env = os.environ.copy()
103
- subprocess.run(
104
- [
105
- "cmake",
106
- "-S",
107
- str(ROOT / "cuda"),
108
- "-B",
109
- str(build_dir),
110
- "-DCMAKE_BUILD_TYPE=Release",
111
- f"-DPython3_EXECUTABLE={args.python}",
112
- f"-DCMAKE_CUDA_ARCHITECTURES={args.cuda_architectures}",
113
- f"-DPMPP_CUDA_ARCHITECTURES={args.cuda_architectures}",
114
- ],
115
- check=True,
116
- cwd=ROOT,
117
- env=env,
118
- )
115
+ subprocess.run([
116
+ "cmake", "-S",
117
+ str(ROOT / "cuda"), "-B",
118
+ str(build_dir), "-DCMAKE_BUILD_TYPE=Release", f"-DPython3_EXECUTABLE={args.python}",
119
+ f"-DCMAKE_CUDA_ARCHITECTURES={args.cuda_architectures}", f"-DPMPP_CUDA_ARCHITECTURES={args.cuda_architectures}",
120
+ ], check=True, cwd=ROOT, env=env,
121
+ )
119
122
  subprocess.run(["cmake", "--build", str(build_dir), "--config", "Release"], check=True, cwd=ROOT, env=env)
120
123
  manifest = _write_manifest(build_dir, args.python, args.cuda_architectures)
121
124
  print(build_dir / "libpmpp_cuda_routing.so")