diffct 2.5.0__tar.gz → 2.5.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 (208) hide show
  1. {diffct-2.5.0 → diffct-2.5.2}/CHANGELOG.md +72 -0
  2. {diffct-2.5.0 → diffct-2.5.2}/CITATION.cff +2 -2
  3. {diffct-2.5.0 → diffct-2.5.2}/PKG-INFO +2 -2
  4. {diffct-2.5.0 → diffct-2.5.2}/README.md +1 -1
  5. {diffct-2.5.0 → diffct-2.5.2}/diffct/__init__.py +1 -1
  6. {diffct-2.5.0 → diffct-2.5.2}/diffct/_solver_state.py +13 -2
  7. {diffct-2.5.0 → diffct-2.5.2}/diffct/analytical_execution.py +24 -6
  8. {diffct-2.5.0 → diffct-2.5.2}/diffct/backends.py +251 -137
  9. {diffct-2.5.0 → diffct-2.5.2}/diffct/chunking.py +14 -10
  10. {diffct-2.5.0 → diffct-2.5.2}/diffct/distribution.py +27 -0
  11. {diffct-2.5.0 → diffct-2.5.2}/diffct/geometry.py +15 -8
  12. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/__init__.py +6 -0
  13. diffct-2.5.2/diffct/kernels/parallel3d_beam.py +357 -0
  14. {diffct-2.5.0 → diffct-2.5.2}/diffct/operators.py +193 -104
  15. {diffct-2.5.0 → diffct-2.5.2}/diffct/projectors.py +32 -15
  16. {diffct-2.5.0 → diffct-2.5.2}/diffct/solvers.py +11 -3
  17. {diffct-2.5.0 → diffct-2.5.2}/diffct/streaming.py +36 -5
  18. {diffct-2.5.0 → diffct-2.5.2}/diffct/utils.py +52 -6
  19. diffct-2.5.2/docs/search/tests/fixtures/runtime-cancel/search.html +14 -0
  20. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/full-model.spec.mjs +2 -1
  21. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/harness.mjs +33 -5
  22. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/item1-ordering.spec.mjs +2 -0
  23. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/item2-single-load.spec.mjs +8 -0
  24. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/item3-cancel.spec.mjs +9 -4
  25. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/item4-leaks.spec.mjs +2 -0
  26. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/item5-errors.spec.mjs +2 -0
  27. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/item6-a11y.spec.mjs +2 -0
  28. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/item7-security.spec.mjs +2 -0
  29. diffct-2.5.2/docs/search/tests/item8-failures.spec.mjs +376 -0
  30. diffct-2.5.2/docs/search/tests/runtime-cancel.config.mjs +20 -0
  31. diffct-2.5.2/docs/search/tests/runtime-cancel.spec.mjs +235 -0
  32. diffct-2.5.2/docs/search/tests/semantic-opt-in.spec.mjs +88 -0
  33. {diffct-2.5.0 → diffct-2.5.2}/formal/README.md +2 -2
  34. {diffct-2.5.0 → diffct-2.5.2}/formal/tla/README.md +13 -8
  35. {diffct-2.5.0 → diffct-2.5.2}/pyproject.toml +1 -1
  36. {diffct-2.5.0 → diffct-2.5.2}/tests/_native_per_axis_spacing.py +1 -1
  37. diffct-2.5.2/tests/test_analytical_input_alias.py +203 -0
  38. diffct-2.5.2/tests/test_analytical_input_alias_bfloat16.py +121 -0
  39. diffct-2.5.2/tests/test_cgls_readonly_callback.py +519 -0
  40. diffct-2.5.2/tests/test_distributed_numeric_failure.py +370 -0
  41. diffct-2.5.2/tests/test_distributed_numeric_failure_native.py +449 -0
  42. diffct-2.5.2/tests/test_geometry_input_validation.py +393 -0
  43. diffct-2.5.2/tests/test_native_stream_cache_threads.py +166 -0
  44. {diffct-2.5.0 → diffct-2.5.2}/tests/test_parallel3d.py +3 -3
  45. diffct-2.5.2/tests/test_parallel3d_native.py +741 -0
  46. diffct-2.5.2/tests/test_parallel3d_native_distributed.py +453 -0
  47. diffct-2.5.2/tests/test_portable_accuracy.py +141 -0
  48. diffct-2.5.2/tests/test_portable_into_default_dtype.py +42 -0
  49. diffct-2.5.2/tests/test_portable_into_snapshots.py +58 -0
  50. diffct-2.5.2/tests/test_portable_into_state_edges.py +122 -0
  51. diffct-2.5.2/tests/test_portable_into_work_plan.py +241 -0
  52. diffct-2.5.2/tests/test_projector_thread_safety.py +263 -0
  53. diffct-2.5.2/tests/test_runtime_store_failures.py +258 -0
  54. {diffct-2.5.0 → diffct-2.5.2}/tests/test_solver_checkpoint_edges.py +77 -0
  55. diffct-2.5.2/tests/test_store_runtime_contract.py +197 -0
  56. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_collective_failures.py +3 -1
  57. diffct-2.5.0/tests/test_geometry_input_validation.py +0 -179
  58. {diffct-2.5.0 → diffct-2.5.2}/.gitignore +0 -0
  59. {diffct-2.5.0 → diffct-2.5.2}/LICENSE +0 -0
  60. {diffct-2.5.0 → diffct-2.5.2}/NOTICE +0 -0
  61. {diffct-2.5.0 → diffct-2.5.2}/diffct/_solver_tv.py +0 -0
  62. {diffct-2.5.0 → diffct-2.5.2}/diffct/analytical.py +0 -0
  63. {diffct-2.5.0 → diffct-2.5.2}/diffct/constants.py +0 -0
  64. {diffct-2.5.0 → diffct-2.5.2}/diffct/differentiable.py +0 -0
  65. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/analytical_transpose.py +0 -0
  66. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/cone_beam.py +0 -0
  67. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/fan_beam.py +0 -0
  68. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/geometry_vjp.py +0 -0
  69. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/parallel_beam.py +0 -0
  70. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/spacing.py +0 -0
  71. {diffct-2.5.0 → diffct-2.5.2}/diffct/kernels/surface_geometry.py +0 -0
  72. {diffct-2.5.0 → diffct-2.5.2}/diffct/pipeline.py +0 -0
  73. {diffct-2.5.0 → diffct-2.5.2}/diffct/reconstruction.py +0 -0
  74. {diffct-2.5.0 → diffct-2.5.2}/diffct/storage.py +0 -0
  75. {diffct-2.5.0 → diffct-2.5.2}/diffct/surface_gradients.py +0 -0
  76. {diffct-2.5.0 → diffct-2.5.2}/diffct/surfaces.py +0 -0
  77. {diffct-2.5.0 → diffct-2.5.2}/docs/assets/gallery/NOTICE +0 -0
  78. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/.gitignore +0 -0
  79. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/fixtures/make_tiny_model.py +0 -0
  80. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/fixtures/tiny-model/config.json +0 -0
  81. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/fixtures/tiny-model/onnx/model_quantized.onnx +0 -0
  82. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/fixtures/tiny-model/onnx/model_quantized.onnx_data +0 -0
  83. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/fixtures/tiny-model/tokenizer.json +0 -0
  84. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/fixtures/tiny-model/tokenizer_config.json +0 -0
  85. {diffct-2.5.0 → diffct-2.5.2}/docs/search/tests/playwright.config.mjs +0 -0
  86. {diffct-2.5.0 → diffct-2.5.2}/docs/video/README.md +0 -0
  87. {diffct-2.5.0 → diffct-2.5.2}/examples/README.md +0 -0
  88. {diffct-2.5.0 → diffct-2.5.2}/examples/_block_cgls.py +0 -0
  89. {diffct-2.5.0 → diffct-2.5.2}/examples/_common.py +0 -0
  90. {diffct-2.5.0 → diffct-2.5.2}/examples/data/NOTICE +0 -0
  91. {diffct-2.5.0 → diffct-2.5.2}/examples/data/preprocess_walnut.py +0 -0
  92. {diffct-2.5.0 → diffct-2.5.2}/examples/walnut_reconstruction.py +0 -0
  93. {diffct-2.5.0 → diffct-2.5.2}/pytest.ini +0 -0
  94. {diffct-2.5.0 → diffct-2.5.2}/tests/__init__.py +0 -0
  95. {diffct-2.5.0 → diffct-2.5.2}/tests/_multiprocessing.py +0 -0
  96. {diffct-2.5.0 → diffct-2.5.2}/tests/_phantoms.py +0 -0
  97. {diffct-2.5.0 → diffct-2.5.2}/tests/benchmarks/README.md +0 -0
  98. {diffct-2.5.0 → diffct-2.5.2}/tests/benchmarks/__init__.py +0 -0
  99. {diffct-2.5.0 → diffct-2.5.2}/tests/benchmarks/_common.py +0 -0
  100. {diffct-2.5.0 → diffct-2.5.2}/tests/benchmarks/test_bench_cone.py +0 -0
  101. {diffct-2.5.0 → diffct-2.5.2}/tests/benchmarks/test_bench_fan.py +0 -0
  102. {diffct-2.5.0 → diffct-2.5.2}/tests/benchmarks/test_bench_parallel.py +0 -0
  103. {diffct-2.5.0 → diffct-2.5.2}/tests/distributed_projector_check.py +0 -0
  104. {diffct-2.5.0 → diffct-2.5.2}/tests/fixtures/native_scalar_spacing_main.npz +0 -0
  105. {diffct-2.5.0 → diffct-2.5.2}/tests/test_adjoint_inner_product.py +0 -0
  106. {diffct-2.5.0 → diffct-2.5.2}/tests/test_allocator_capacity.py +0 -0
  107. {diffct-2.5.0 → diffct-2.5.2}/tests/test_analytical_autograd.py +0 -0
  108. {diffct-2.5.0 → diffct-2.5.2}/tests/test_analytical_distribution.py +0 -0
  109. {diffct-2.5.0 → diffct-2.5.2}/tests/test_analytical_regressions.py +0 -0
  110. {diffct-2.5.0 → diffct-2.5.2}/tests/test_analytical_weight_distribution.py +0 -0
  111. {diffct-2.5.0 → diffct-2.5.2}/tests/test_angular_low_precision.py +0 -0
  112. {diffct-2.5.0 → diffct-2.5.2}/tests/test_axis_aligned_chords.py +0 -0
  113. {diffct-2.5.0 → diffct-2.5.2}/tests/test_batch_execution_edges.py +0 -0
  114. {diffct-2.5.0 → diffct-2.5.2}/tests/test_batched_surfaces.py +0 -0
  115. {diffct-2.5.0 → diffct-2.5.2}/tests/test_block_cgls.py +0 -0
  116. {diffct-2.5.0 → diffct-2.5.2}/tests/test_block_storage.py +0 -0
  117. {diffct-2.5.0 → diffct-2.5.2}/tests/test_call_trajectory.py +0 -0
  118. {diffct-2.5.0 → diffct-2.5.2}/tests/test_cgls_state_admission.py +0 -0
  119. {diffct-2.5.0 → diffct-2.5.2}/tests/test_checkpoint_metadata_validation.py +0 -0
  120. {diffct-2.5.0 → diffct-2.5.2}/tests/test_chunked_projector.py +0 -0
  121. {diffct-2.5.0 → diffct-2.5.2}/tests/test_completed_transfer_reuse.py +0 -0
  122. {diffct-2.5.0 → diffct-2.5.2}/tests/test_cone_backprojection_transpose.py +0 -0
  123. {diffct-2.5.0 → diffct-2.5.2}/tests/test_cone_projector_autograd.py +0 -0
  124. {diffct-2.5.0 → diffct-2.5.2}/tests/test_cpu_install.py +0 -0
  125. {diffct-2.5.0 → diffct-2.5.2}/tests/test_cuda_exit_deallocations.py +0 -0
  126. {diffct-2.5.0 → diffct-2.5.2}/tests/test_cuda_sink_lifetimes.py +0 -0
  127. {diffct-2.5.0 → diffct-2.5.2}/tests/test_cuda_smoke.py +0 -0
  128. {diffct-2.5.0 → diffct-2.5.2}/tests/test_detector_surface_dtypes.py +0 -0
  129. {diffct-2.5.0 → diffct-2.5.2}/tests/test_detector_surface_mapping.py +0 -0
  130. {diffct-2.5.0 → diffct-2.5.2}/tests/test_detector_surface_units.py +0 -0
  131. {diffct-2.5.0 → diffct-2.5.2}/tests/test_detector_surfaces.py +0 -0
  132. {diffct-2.5.0 → diffct-2.5.2}/tests/test_distributed_training_transforms.py +0 -0
  133. {diffct-2.5.0 → diffct-2.5.2}/tests/test_example_psnr.py +0 -0
  134. {diffct-2.5.0 → diffct-2.5.2}/tests/test_execution_buffers.py +0 -0
  135. {diffct-2.5.0 → diffct-2.5.2}/tests/test_execution_features.py +0 -0
  136. {diffct-2.5.0 → diffct-2.5.2}/tests/test_execution_schedules.py +0 -0
  137. {diffct-2.5.0 → diffct-2.5.2}/tests/test_fbp_fan_accuracy.py +0 -0
  138. {diffct-2.5.0 → diffct-2.5.2}/tests/test_fbp_fan_offsets.py +0 -0
  139. {diffct-2.5.0 → diffct-2.5.2}/tests/test_fbp_parallel_accuracy.py +0 -0
  140. {diffct-2.5.0 → diffct-2.5.2}/tests/test_fdk_cone_accuracy.py +0 -0
  141. {diffct-2.5.0 → diffct-2.5.2}/tests/test_fdk_cone_offsets.py +0 -0
  142. {diffct-2.5.0 → diffct-2.5.2}/tests/test_geometry_autograd.py +0 -0
  143. {diffct-2.5.0 → diffct-2.5.2}/tests/test_geometry_conversions.py +0 -0
  144. {diffct-2.5.0 → diffct-2.5.2}/tests/test_geometry_gradients.py +0 -0
  145. {diffct-2.5.0 → diffct-2.5.2}/tests/test_gpu_performance_contracts.py +0 -0
  146. {diffct-2.5.0 → diffct-2.5.2}/tests/test_gradcheck.py +0 -0
  147. {diffct-2.5.0 → diffct-2.5.2}/tests/test_lazy_native_observers.py +0 -0
  148. {diffct-2.5.0 → diffct-2.5.2}/tests/test_live_trajectory_validation.py +0 -0
  149. {diffct-2.5.0 → diffct-2.5.2}/tests/test_mps_backend.py +0 -0
  150. {diffct-2.5.0 → diffct-2.5.2}/tests/test_multi_gpu_exit.py +0 -0
  151. {diffct-2.5.0 → diffct-2.5.2}/tests/test_multiprocessing.py +0 -0
  152. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_endpoint_precision.py +0 -0
  153. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_per_axis_admission.py +0 -0
  154. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_per_axis_extremes.py +0 -0
  155. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_per_axis_helical.py +0 -0
  156. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_per_axis_spacing.py +0 -0
  157. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_per_axis_spacing_gpu.py +0 -0
  158. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_surface_transforms.py +0 -0
  159. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_volume_layout.py +0 -0
  160. {diffct-2.5.0 → diffct-2.5.2}/tests/test_native_volume_layout_distributed.py +0 -0
  161. {diffct-2.5.0 → diffct-2.5.2}/tests/test_output_pipeline_overlap.py +0 -0
  162. {diffct-2.5.0 → diffct-2.5.2}/tests/test_parallel3d_surface_oracle.py +0 -0
  163. {diffct-2.5.0 → diffct-2.5.2}/tests/test_partition_lifecycle.py +0 -0
  164. {diffct-2.5.0 → diffct-2.5.2}/tests/test_plan_memory_bounds.py +0 -0
  165. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_bounded_autograd.py +0 -0
  166. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_cuda_budget.py +0 -0
  167. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_distributed_geometry.py +0 -0
  168. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_endpoint_precision.py +0 -0
  169. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_execution_bounds.py +0 -0
  170. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_numeric_regressions.py +0 -0
  171. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_sampler_snapshot.py +0 -0
  172. {diffct-2.5.0 → diffct-2.5.2}/tests/test_portable_surface_admission.py +0 -0
  173. {diffct-2.5.0 → diffct-2.5.2}/tests/test_pr42_review_regressions.py +0 -0
  174. {diffct-2.5.0 → diffct-2.5.2}/tests/test_projector_api.py +0 -0
  175. {diffct-2.5.0 → diffct-2.5.2}/tests/test_projector_degenerate_geometry.py +0 -0
  176. {diffct-2.5.0 → diffct-2.5.2}/tests/test_projector_geometry_devices.py +0 -0
  177. {diffct-2.5.0 → diffct-2.5.2}/tests/test_ramp_filter_windows.py +0 -0
  178. {diffct-2.5.0 → diffct-2.5.2}/tests/test_reconstruction_api.py +0 -0
  179. {diffct-2.5.0 → diffct-2.5.2}/tests/test_reconstruction_work_reuse.py +0 -0
  180. {diffct-2.5.0 → diffct-2.5.2}/tests/test_reference_backend.py +0 -0
  181. {diffct-2.5.0 → diffct-2.5.2}/tests/test_release_2_0_1.py +0 -0
  182. {diffct-2.5.0 → diffct-2.5.2}/tests/test_review_230.py +0 -0
  183. {diffct-2.5.0 → diffct-2.5.2}/tests/test_review_regressions.py +0 -0
  184. {diffct-2.5.0 → diffct-2.5.2}/tests/test_solver_admission_regressions.py +0 -0
  185. {diffct-2.5.0 → diffct-2.5.2}/tests/test_solver_api.py +0 -0
  186. {diffct-2.5.0 → diffct-2.5.2}/tests/test_solver_collective_failures.py +0 -0
  187. {diffct-2.5.0 → diffct-2.5.2}/tests/test_solver_device_scalars.py +0 -0
  188. {diffct-2.5.0 → diffct-2.5.2}/tests/test_spatial_partition.py +0 -0
  189. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_composition_kernel.py +0 -0
  190. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_compute_shards.py +0 -0
  191. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_geometry_cudasim.py +0 -0
  192. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_gpu_execution.py +0 -0
  193. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_gradient_replay.py +0 -0
  194. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_host_sampling_budget.py +0 -0
  195. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_native_regressions.py +0 -0
  196. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_parameter_updates.py +0 -0
  197. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_pipeline_contracts.py +0 -0
  198. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_saved_snapshot_budget.py +0 -0
  199. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_snapshot_admission.py +0 -0
  200. {diffct-2.5.0 → diffct-2.5.2}/tests/test_surface_trajectory_transform.py +0 -0
  201. {diffct-2.5.0 → diffct-2.5.2}/tests/test_training_transforms.py +0 -0
  202. {diffct-2.5.0 → diffct-2.5.2}/tests/test_trajectory_admission_cost.py +0 -0
  203. {diffct-2.5.0 → diffct-2.5.2}/tests/test_trajectory_surface_integration.py +0 -0
  204. {diffct-2.5.0 → diffct-2.5.2}/tests/test_transfer_pipeline.py +0 -0
  205. {diffct-2.5.0 → diffct-2.5.2}/tests/test_transfer_retirement_lifetimes.py +0 -0
  206. {diffct-2.5.0 → diffct-2.5.2}/tests/test_tv_zero_dependency.py +0 -0
  207. {diffct-2.5.0 → diffct-2.5.2}/tests/test_two_far_endpoints.py +0 -0
  208. {diffct-2.5.0 → diffct-2.5.2}/tests/test_weights.py +0 -0
@@ -5,6 +5,78 @@ All notable changes to this project are documented in this file.
5
5
  The format is based on [Keep a Changelog](https://keepachangelog.com/en/1.1.0/),
6
6
  and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0.html).
7
7
 
8
+ ## [2.5.2] - 2026-11-15
9
+
10
+ ### Added
11
+
12
+ - `beam="parallel3d"` runs on the native NVIDIA CUDA backend. `backend="numba"`
13
+ accepts it under the same conditions as cone, and `backend="auto"` selects
14
+ it on NVIDIA CUDA with `precision="fast"` and a views or space partition.
15
+ Values, data gradients and trajectory gradients match the portable backend;
16
+ detector surfaces, per-axis spacing, chunking, `*_into` streaming,
17
+ `native_volume_layout`, multiple devices and NCCL partitions are supported
18
+ ([#72](https://github.com/sypsyp97/diffct/pull/72)).
19
+
20
+ ### Fixed
21
+
22
+ - A numerical failure on one rank, such as a CUDA out-of-memory error during
23
+ a kernel launch, now raises on every rank of the same call, on the portable
24
+ and the native backend. The failing rank keeps its own exception; peers
25
+ raise a `RuntimeError` that names the failing rank. Before, peers could
26
+ return success or wait until the process-group timeout. The projector and
27
+ process group stay usable after the error. Distributed calls do one extra
28
+ small control reduction to agree on the outcome
29
+ ([#71](https://github.com/sypsyp97/diffct/pull/71)).
30
+ - Concurrent calls from several Python threads on one `Projector` no longer
31
+ fail with `TypeError` in statistics bookkeeping. `last_execution_stats` is
32
+ per thread: each thread reads the statistics of its own last call
33
+ ([#71](https://github.com/sypsyp97/diffct/pull/71)).
34
+ - Portable store errors no longer strand peer ranks in the next collective;
35
+ analytical weight/output byte overlap is rejected before numerical I/O for
36
+ every dtype; CGLS callback iterates are read-only, and a mutation raises
37
+ before more numerical work
38
+ ([#69](https://github.com/sypsyp97/diffct/pull/69)).
39
+
40
+ ### Documentation
41
+
42
+ - AMD GPUs: the execution guide states that ROCm runs the portable backend and
43
+ lists the tested AMD hardware and software versions.
44
+ - The execution guide describes how a failure on one rank is raised on every
45
+ rank, and the chunking guide states that `last_execution_stats` is per thread.
46
+ - The documentation search recovers from model download failures, offers a
47
+ retry, and falls back to the CPU when WebGPU fails
48
+ ([#70](https://github.com/sypsyp97/diffct/pull/70)).
49
+ - The execution guide describes the 2.5.1 checkpoint and seed behaviour
50
+ ([#68](https://github.com/sypsyp97/diffct/pull/68)).
51
+
52
+ ## [2.5.1] - 2026-11-07
53
+
54
+ ### Fixed
55
+
56
+ - Saving a solver checkpoint into a step that already exists raises a clear
57
+ `ValueError` that names the existing directory, instead of a bare
58
+ `FileExistsError`. The existing checkpoint is not changed. Use a new
59
+ `checkpoint_directory`, or pass `resume=` to continue from it. Thanks to
60
+ @cslht11 ([#63](https://github.com/sypsyp97/diffct/pull/63)).
61
+ - `random_trajectory_3d(seed=...)` draws its noise from a private generator
62
+ and no longer reseeds the process-wide PyTorch generator. Seeded
63
+ trajectories are unchanged. Thanks to @cslht11
64
+ ([#64](https://github.com/sypsyp97/diffct/pull/64)).
65
+
66
+ ### Changed
67
+
68
+ - CPU tests check the FBP, FDK and short-scan Parker accuracy bounds on the
69
+ portable backend, so CI covers them without a GPU. Thanks to @cslht11
70
+ ([#65](https://github.com/sypsyp97/diffct/pull/65)).
71
+ - A `.mailmap` joins the commits of one contributor under one name
72
+ ([#62](https://github.com/sypsyp97/diffct/pull/62)).
73
+
74
+ ### Documentation
75
+
76
+ - Semantic search on the documentation site is off by default. The
77
+ embedding model (about 377 MB) downloads only after the visitor enables it
78
+ ([#66](https://github.com/sypsyp97/diffct/pull/66)).
79
+
8
80
  ## [2.5.0] - 2026-10-26
9
81
 
10
82
  ### Added
@@ -14,8 +14,8 @@ authors:
14
14
  given-names: Yipeng
15
15
  email: yipeng.sun@fau.de
16
16
  alias: sypsyp97
17
- version: 2.5.0
18
- date-released: "2026-10-26"
17
+ version: 2.5.2
18
+ date-released: "2026-11-15"
19
19
  license: Apache-2.0
20
20
  repository-code: "https://github.com/sypsyp97/diffct"
21
21
  url: "https://sypsyp97.github.io/diffct/"
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.5
2
2
  Name: diffct
3
- Version: 2.5.0
3
+ Version: 2.5.2
4
4
  Summary: Differentiable CT projection and reconstruction: precision modes, streaming, distributed execution and geometry gradients
5
5
  Project-URL: Homepage, https://github.com/sypsyp97/diffct
6
6
  Project-URL: Documentation, https://sypsyp97.github.io/diffct/
@@ -146,7 +146,7 @@ loss.backward() # x.grad = A^T (A x - y)
146
146
 
147
147
  **Per-axis voxel spacing.** Set `voxel_spacing=(dy, dx)` or `(dz, dy, dx)` in tensor axis order. Both backends support these pitches for projection, projection geometry gradients and FBP/FDK with fixed geometry.
148
148
 
149
- **3D parallel beams.** Use `circular_trajectory_3d_parallel(...)` and `beam="parallel3d"`. The PyTorch backend provides matched projection and backprojection on CPU and CUDA.
149
+ **3D parallel beams.** Use `circular_trajectory_3d_parallel(...)` and `beam="parallel3d"`. The native and PyTorch backends provide matched projection and backprojection on NVIDIA CUDA, CPU and other PyTorch devices.
150
150
 
151
151
  **Native volume layout.** For unbatched, flat-detector cone operations, set `native_volume_layout=True` to avoid volume layout copies. This applies to the native full-CUDA path on one compute device. Shapes stay `(D, H, W)`; the returned strides follow the kernel layout. The default is `False`. See [chunked execution](docs/REFERENCE.md#chunked-execution) for limits.
152
152
 
@@ -115,7 +115,7 @@ loss.backward() # x.grad = A^T (A x - y)
115
115
 
116
116
  **Per-axis voxel spacing.** Set `voxel_spacing=(dy, dx)` or `(dz, dy, dx)` in tensor axis order. Both backends support these pitches for projection, projection geometry gradients and FBP/FDK with fixed geometry.
117
117
 
118
- **3D parallel beams.** Use `circular_trajectory_3d_parallel(...)` and `beam="parallel3d"`. The PyTorch backend provides matched projection and backprojection on CPU and CUDA.
118
+ **3D parallel beams.** Use `circular_trajectory_3d_parallel(...)` and `beam="parallel3d"`. The native and PyTorch backends provide matched projection and backprojection on NVIDIA CUDA, CPU and other PyTorch devices.
119
119
 
120
120
  **Native volume layout.** For unbatched, flat-detector cone operations, set `native_volume_layout=True` to avoid volume layout copies. This applies to the native full-CUDA path on one compute device. Shapes stay `(D, H, W)`; the returned strides follow the kernel layout. The default is `False`. See [chunked execution](docs/REFERENCE.md#chunked-execution) for limits.
121
121
 
@@ -64,7 +64,7 @@ try:
64
64
  except ImportError:
65
65
  pass
66
66
 
67
- __version__ = '2.5.0'
67
+ __version__ = '2.5.2'
68
68
 
69
69
  __all__ = [
70
70
  'Projector',
@@ -288,6 +288,11 @@ def save_checkpoint(operator, directory, states, metadata, iteration, history, m
288
288
  step = Path(directory).resolve() / f"step-{iteration:06d}"
289
289
  step.mkdir(parents=True, exist_ok=True)
290
290
  rank = step / f"rank-{getattr(operator, 'rank', 0):05d}"
291
+ if rank.exists():
292
+ # Replacing a published step in place could destroy it on a
293
+ # failed write, and ranks cannot roll back together.
294
+ raise ValueError(f"checkpoint {rank} already exists; use a new checkpoint_directory "
295
+ "or pass resume= to continue from it")
291
296
  rank.mkdir()
292
297
  for name, source in states.items():
293
298
  source = TensorStore(source.detach()) if isinstance(source, torch.Tensor) else source
@@ -323,10 +328,16 @@ def callbacks_enabled(operator, callback):
323
328
  world_size=getattr(operator, "world_size", 1))[0])
324
329
 
325
330
 
326
- def callback_stop(operator, callback, iteration, residual, volume):
331
+ def callback_stop(operator, callback, iteration, residual, volume, *, readonly=False,
332
+ block_elements=1048576):
327
333
  error, stop = None, False
328
334
  try:
329
- stop = callback is not None and callback(iteration, residual, volume) is False
335
+ if callback is not None:
336
+ before = (fingerprint(volume, block_elements), getattr(volume, "device", None)) if readonly else None
337
+ stop = callback(iteration, residual, volume) is False
338
+ if readonly and ((isinstance(volume, torch.Tensor) and not torch.is_floating_point(volume))
339
+ or (fingerprint(volume, block_elements), getattr(volume, "device", None)) != before):
340
+ raise ValueError("CGLS callback iterate is read-only")
330
341
  except Exception as caught:
331
342
  error = caught
332
343
  failed, stop = control_status((int(error is not None), int(stop)),
@@ -21,7 +21,9 @@ from .chunking import _memory_budget, _pixel_tiles
21
21
  from .distribution import Partition, preflight
22
22
  from .operators import _detector_spacing, _normalize_devices, _positive_int, _shape, _validate_trajectory
23
23
  from .reconstruction import _angles, _cosine, _filter, _fixed, _parker_setup
24
- from .streaming import _as_store, _validate_stores
24
+ from .streaming import (_as_store, _backing_store, _backing_tensor, _store_phase,
25
+ _store_rounds, _tensor_overlap, _validate_stores)
26
+ from .storage import NpyStore
25
27
 
26
28
 
27
29
  def _weight(value, shape, name, *, exact=False):
@@ -351,7 +353,7 @@ class AnalyticalExecution:
351
353
  return cone_weighted_backproject(data, *geometry, *shape, *self.pitch,
352
354
  self.voxel_spacing, isocenter=isocenter)
353
355
 
354
- def _tile(self, spatial):
356
+ def _tile(self, spatial, *, reduce=True):
355
357
  shape = tuple(part.stop - part.start for part in spatial)
356
358
  value = torch.zeros(shape, device=self.output_device, dtype=self.dtype)
357
359
  if self.input_dependency is not None:
@@ -361,7 +363,7 @@ class AnalyticalExecution:
361
363
  partial = (self._native_gather(filtered, geometry, spatial) if self.backend == "numba"
362
364
  else self._portable_gather(filtered, geometry, views, spatial))
363
365
  value = value + partial.to(self.output_device)
364
- return _sum(value, self.partition.view_group, self.partition.view_world_size)
366
+ return _sum(value, self.partition.view_group, self.partition.view_world_size) if reduce else value
365
367
 
366
368
  def _prepare_gradients(self):
367
369
  partition = self.partition
@@ -426,17 +428,33 @@ class AnalyticalExecution:
426
428
  error, source, sink = None, None, None
427
429
  try:
428
430
  source, sink = _validate_stores(self, self.source, output, False)
431
+ output_tensor = _backing_tensor(sink)
432
+ backing = _backing_store(sink)
433
+ if isinstance(backing, NpyStore):
434
+ output_tensor = torch.from_numpy(backing._array)
429
435
  for option in (self.projection_weights, self.angular_weights, self.filter_response):
430
436
  if isinstance(option, torch.Tensor) and option.requires_grad:
431
437
  raise ValueError("into methods are numerical; detach autograd weights")
438
+ if (isinstance(option, torch.Tensor) and isinstance(output_tensor, torch.Tensor)
439
+ and _tensor_overlap(option, output_tensor)):
440
+ raise ValueError("analytical weights and output stores overlap")
432
441
  except (ValueError, TypeError, RuntimeError, OSError) as caught:
433
442
  error = caught
434
443
  self.partition.preflight(error)
435
444
  self.source = source
436
445
  with torch.no_grad():
437
- for spatial, _ in _pixel_tiles(self.volume_shape, self.chunk_shape):
438
- sink.write(spatial, self._tile(spatial))
439
- sink.flush()
446
+ for job in _store_rounds(_pixel_tiles(self.volume_shape, self.chunk_shape), self.partition):
447
+ with _store_phase(self.partition):
448
+ if job is not None:
449
+ spatial, _ = job
450
+ value = self._tile(spatial, reduce=False)
451
+ if job is not None:
452
+ value = _sum(value, self.partition.view_group, self.partition.view_world_size)
453
+ with _store_phase(self.partition):
454
+ if job is not None:
455
+ sink.write(spatial, value)
456
+ with _store_phase(self.partition):
457
+ sink.flush()
440
458
  return original
441
459
 
442
460