grace-runtime 0.1.2__tar.gz → 0.1.3__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 (321) hide show
  1. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/CHANGELOG.md +31 -0
  2. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/PKG-INFO +1 -1
  3. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/lammps.md +8 -3
  4. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/pyproject.toml +1 -1
  5. grace_runtime-0.1.3/python/grace_runtime/_core.py +91 -0
  6. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/calculator.py +5 -2
  7. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_auto_device.py +17 -8
  8. grace_runtime-0.1.3/python/tests/test_openmp_check.py +66 -0
  9. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python-cuda/pyproject.toml +2 -2
  10. grace_runtime-0.1.2/python/grace_runtime/_core.py +0 -35
  11. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/.github/workflows/cpu-wheels.yml +0 -0
  12. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/.github/workflows/cuda-wheels.yml +0 -0
  13. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/.github/workflows/release.yml +0 -0
  14. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/.github/workflows/rocm-wheels.yml +0 -0
  15. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/.gitignore +0 -0
  16. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/.readthedocs.yaml +0 -0
  17. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/CMakeLists.txt +0 -0
  18. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/LICENSE.md +0 -0
  19. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/README.md +0 -0
  20. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/THIRD_PARTY_NOTICES.md +0 -0
  21. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/cmake/GraceHipAtomics.cmake +0 -0
  22. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/cmake/GraceRuntime.cmake +0 -0
  23. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/advanced.md +0 -0
  24. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/api.md +0 -0
  25. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/backends.md +0 -0
  26. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/benchmarks.md +0 -0
  27. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/development.md +0 -0
  28. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/dispersion.md +0 -0
  29. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/hooks/api_reference.py +0 -0
  30. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/images/benchmarks-atoms.png +0 -0
  31. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/images/benchmarks-time.png +0 -0
  32. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/index.md +0 -0
  33. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/installation.md +0 -0
  34. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/models.md +0 -0
  35. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/pace.md +0 -0
  36. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/properties.md +0 -0
  37. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/relax.md +0 -0
  38. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/requirements.txt +0 -0
  39. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/torchsim.md +0 -0
  40. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/docs/usage.md +0 -0
  41. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/bonds.h +0 -0
  42. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/cell_list.h +0 -0
  43. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/coupling.h +0 -0
  44. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/cpu_gemm.h +0 -0
  45. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/cpu_simd.h +0 -0
  46. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/d3.h +0 -0
  47. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/d3_params.h +0 -0
  48. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/dispersion.h +0 -0
  49. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/error.h +0 -0
  50. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/fused_1l.h +0 -0
  51. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/fused_2l.h +0 -0
  52. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/fused_3l.h +0 -0
  53. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/fused_3l_cpu.h +0 -0
  54. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/fused_cpu.h +0 -0
  55. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/fused_cpu_types.h +0 -0
  56. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/hd.h +0 -0
  57. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/blas.h +0 -0
  58. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/csr_images.h +0 -0
  59. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/cublas_guard.h +0 -0
  60. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/d3_kk.h +0 -0
  61. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/fused_common.h +0 -0
  62. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/fused_dense.h +0 -0
  63. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/fused_hip_bonds.h +0 -0
  64. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/g1l_shape_large.h +0 -0
  65. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/g2l_shape_smaxl.h +0 -0
  66. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/g2l_shape_smaxm.h +0 -0
  67. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_1l_fused_kk.h +0 -0
  68. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_1l_fused_kk_impl.h +0 -0
  69. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_1l_kk.h +0 -0
  70. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_1l_kk_impl.h +0 -0
  71. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_2l_fused_kk.h +0 -0
  72. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_2l_fused_kk_impl.h +0 -0
  73. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_2l_kk.h +0 -0
  74. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_2l_kk_impl.h +0 -0
  75. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_fused_kk.h +0 -0
  76. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk.h +0 -0
  77. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk_cpl.h +0 -0
  78. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk_cpl_path.h +0 -0
  79. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk_dense.h +0 -0
  80. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk_impl.h +0 -0
  81. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk_radial.h +0 -0
  82. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk_spbf.h +0 -0
  83. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/grace_3l_kk_spbf_mfma.h +0 -0
  84. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/kk_gemm.h +0 -0
  85. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/kk_mfma.h +0 -0
  86. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/neighbors_kk.h +0 -0
  87. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/pace_kk.h +0 -0
  88. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/rocblas_guard.h +0 -0
  89. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/support.h +0 -0
  90. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/kk/traits.h +0 -0
  91. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/model_1l.h +0 -0
  92. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/model_2l.h +0 -0
  93. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/model_3l.h +0 -0
  94. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/model_kind.h +0 -0
  95. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/pace_cpu.h +0 -0
  96. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/pace_embedding.h +0 -0
  97. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/pace_model.h +0 -0
  98. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/pace_radial.h +0 -0
  99. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/pace_tables.h +0 -0
  100. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/radial_x.h +0 -0
  101. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/system.h +0 -0
  102. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/type_map.h +0 -0
  103. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/uq.h +0 -0
  104. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/include/grace/uq_head.h +0 -0
  105. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/fused_1l.cpp +0 -0
  106. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/fused_2l.cpp +0 -0
  107. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/fused_3l.cpp +0 -0
  108. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/model_1l.cpp +0 -0
  109. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/model_2l.cpp +0 -0
  110. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/model_3l.cpp +0 -0
  111. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/model_kind.cpp +0 -0
  112. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/npz3.h +0 -0
  113. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/pace_convert.cpp +0 -0
  114. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/pace_convert.h +0 -0
  115. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/pace_cpu.cpp +0 -0
  116. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/pace_model.cpp +0 -0
  117. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/pace_tables.cpp +0 -0
  118. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/pace_yaml.cpp +0 -0
  119. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/pace_yaml.h +0 -0
  120. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/uq.cpp +0 -0
  121. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/uq_head.cpp +0 -0
  122. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/src/zero_pad.h +0 -0
  123. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/third_party/d3_data/LICENSE +0 -0
  124. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/third_party/grace_cnpy/LICENSE +0 -0
  125. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/third_party/grace_cnpy/cnpy.cpp +0 -0
  126. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/libgrace/third_party/grace_cnpy/cnpy.h +0 -0
  127. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/mkdocs.yml +0 -0
  128. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/CMakeLists.txt +0 -0
  129. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/LICENSE-libomp +0 -0
  130. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/ase/grace_runtime_ase.ipynb +0 -0
  131. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/phonons/phonons_batch.py +0 -0
  132. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/relax/solute_vacancy_relax.py +0 -0
  133. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/torchsim/_models.py +0 -0
  134. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/torchsim/elastic_batch.py +0 -0
  135. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/torchsim/solute_vacancy_relax.py +0 -0
  136. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/torchsim/temperature_scan.py +0 -0
  137. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/examples/torchsim/uq_md_ensemble.py +0 -0
  138. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/__init__.py +0 -0
  139. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/_cuda.py +0 -0
  140. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/_dispatch.py +0 -0
  141. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/_gpu.py +0 -0
  142. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/_rocm.py +0 -0
  143. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/batch.py +0 -0
  144. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/cli.py +0 -0
  145. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/dispersion.py +0 -0
  146. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/models.json +0 -0
  147. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/neighbors.py +0 -0
  148. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/phonons.py +0 -0
  149. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/properties.py +0 -0
  150. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/registry.py +0 -0
  151. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/relax.py +0 -0
  152. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/grace_runtime/torchsim.py +0 -0
  153. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/kk/CMakeLists.txt +0 -0
  154. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/kk/kk_api.h +0 -0
  155. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/kk/kk_core.cpp +0 -0
  156. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/kk/kk_core_3l.cpp +0 -0
  157. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/kk/kk_module.cpp +0 -0
  158. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/src/core.cpp +0 -0
  159. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/src/dispersion_args.h +0 -0
  160. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/src/exports.map +0 -0
  161. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/src/neighbors.cpp +0 -0
  162. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/src/neighbors.h +0 -0
  163. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/conftest.py +0 -0
  164. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/d3_ref.py +0 -0
  165. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/gate_cells.py +0 -0
  166. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/gpu_tools.py +0 -0
  167. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/model_tools.py +0 -0
  168. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/pace_tools.py +0 -0
  169. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_batch.py +0 -0
  170. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_bond_source.py +0 -0
  171. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_calculator.py +0 -0
  172. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_compressed.py +0 -0
  173. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_core.py +0 -0
  174. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_cuda_plugin.py +0 -0
  175. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_d3.py +0 -0
  176. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_dispatch.py +0 -0
  177. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_docs_api.py +0 -0
  178. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_energy_only.py +0 -0
  179. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_examples.py +0 -0
  180. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_alloc_failure.py +0 -0
  181. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_batch.py +0 -0
  182. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_batch_device.py +0 -0
  183. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_calculator.py +0 -0
  184. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_chunk.py +0 -0
  185. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_d3.py +0 -0
  186. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_memory.py +0 -0
  187. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_module.py +0 -0
  188. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_pace.py +0 -0
  189. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_pace_uq.py +0 -0
  190. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_parity.py +0 -0
  191. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_properties.py +0 -0
  192. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_relax.py +0 -0
  193. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_gpu_several_calculators.py +0 -0
  194. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_neighbors.py +0 -0
  195. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_pace.py +0 -0
  196. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_pace_calculator.py +0 -0
  197. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_pace_ctilde.py +0 -0
  198. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_pace_npz.py +0 -0
  199. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_pace_radial.py +0 -0
  200. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_pace_spec.py +0 -0
  201. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_pace_uq.py +0 -0
  202. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_phonons.py +0 -0
  203. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_properties.py +0 -0
  204. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_ref_tf.py +0 -0
  205. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_registry.py +0 -0
  206. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_relax.py +0 -0
  207. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_rocm_plugin.py +0 -0
  208. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_runtimes.py +0 -0
  209. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_symmetry.py +0 -0
  210. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_torchsim.py +0 -0
  211. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_uq.py +0 -0
  212. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python/tests/test_vs_tp.py +0 -0
  213. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python-cuda/CMakeLists.txt +0 -0
  214. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python-cuda/LICENSE-Kokkos +0 -0
  215. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python-cuda/README.md +0 -0
  216. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/python-cuda/grace_runtime_cuda12/__init__.py +0 -0
  217. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/coupling_ref.h +0 -0
  218. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/d3_ref.h +0 -0
  219. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/W2tri.data +0 -0
  220. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/W2tri.npz +0 -0
  221. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/W54.data +0 -0
  222. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/W54.npz +0 -0
  223. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/WMo54.data +0 -0
  224. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/WMo54.npz +0 -0
  225. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/d3_ref.npz +0 -0
  226. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/grace_1l_small.npz +0 -0
  227. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/grace_2l_small.npz +0 -0
  228. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/legacy_1l_wide.npz +0 -0
  229. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/legacy_2l_small.npz +0 -0
  230. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/legacy_2l_wide.npz +0 -0
  231. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/al_fs_plain.yaml +0 -0
  232. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/au_chebpow_density.yaml +0 -0
  233. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/au_dist_corerep.yaml +0 -0
  234. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/carbon_zbl.yaml +0 -0
  235. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/cells.extxyz +0 -0
  236. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/ethanol_nd1.yaml +0 -0
  237. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/ho_nd5.yaml +0 -0
  238. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/mnbtw_4el.yaml +0 -0
  239. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/ni_lmax6.yaml +0 -0
  240. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/pace/pdh_zbl.yaml +0 -0
  241. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W2tri_1l.dump +0 -0
  242. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W2tri_1l.thermo +0 -0
  243. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W2tri_2l.dump +0 -0
  244. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W2tri_2l.thermo +0 -0
  245. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W2tri_3l.dump +0 -0
  246. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W2tri_3l.thermo +0 -0
  247. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W54_1l.dump +0 -0
  248. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W54_1l.thermo +0 -0
  249. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W54_2l.dump +0 -0
  250. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W54_2l.thermo +0 -0
  251. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W54_3l.dump +0 -0
  252. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/W54_3l.thermo +0 -0
  253. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/WMo54_1l.dump +0 -0
  254. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/WMo54_1l.thermo +0 -0
  255. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/WMo54_2l.dump +0 -0
  256. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/WMo54_2l.thermo +0 -0
  257. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/WMo54_3l.dump +0 -0
  258. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref/WMo54_3l.thermo +0 -0
  259. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_cpl/WMo54_1l.txt +0 -0
  260. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_cpl/WMo54_2l.txt +0 -0
  261. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_cpl/WMo54_3l.txt +0 -0
  262. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_1l_fused.dump +0 -0
  263. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_1l_fused.thermo +0 -0
  264. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_1l_kk.dump +0 -0
  265. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_1l_kk.thermo +0 -0
  266. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_2l_fused.dump +0 -0
  267. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_2l_fused.thermo +0 -0
  268. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_2l_kk.dump +0 -0
  269. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_2l_kk.thermo +0 -0
  270. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_3l_kk.dump +0 -0
  271. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W2tri_3l_kk.thermo +0 -0
  272. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_1l_fused.dump +0 -0
  273. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_1l_fused.thermo +0 -0
  274. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_1l_kk.dump +0 -0
  275. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_1l_kk.thermo +0 -0
  276. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_2l_fused.dump +0 -0
  277. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_2l_fused.thermo +0 -0
  278. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_2l_kk.dump +0 -0
  279. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_2l_kk.thermo +0 -0
  280. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_3l_kk.dump +0 -0
  281. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/W54_3l_kk.thermo +0 -0
  282. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_1l_fused.dump +0 -0
  283. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_1l_fused.thermo +0 -0
  284. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_1l_kk.dump +0 -0
  285. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_1l_kk.thermo +0 -0
  286. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_2l_fused.dump +0 -0
  287. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_2l_fused.thermo +0 -0
  288. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_2l_kk.dump +0 -0
  289. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_2l_kk.thermo +0 -0
  290. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_3l_kk.dump +0 -0
  291. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/fixtures/ref_gpu/WMo54_3l_kk.thermo +0 -0
  292. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/kk_csr_util.h +0 -0
  293. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_1l_compile.cpp +0 -0
  294. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_2l_compile.cpp +0 -0
  295. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_2l_large.cpp +0 -0
  296. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_3l_compile.cpp +0 -0
  297. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_coupling.cpp +0 -0
  298. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_csr.cpp +0 -0
  299. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_csr_3l.cpp +0 -0
  300. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_d3.cpp +0 -0
  301. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_device.cpp +0 -0
  302. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_gemm.cpp +0 -0
  303. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_large.cpp +0 -0
  304. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_launch_check.cpp +0 -0
  305. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/kk/test_kk_neighbors.cpp +0 -0
  306. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_bonds.cpp +0 -0
  307. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_coupling.cpp +0 -0
  308. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_d3.cpp +0 -0
  309. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_driver.cpp +0 -0
  310. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_driver_uq.cpp +0 -0
  311. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_error.cpp +0 -0
  312. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_gemm.cpp +0 -0
  313. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_host_memory.cpp +0 -0
  314. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_kernels_compile.cpp +0 -0
  315. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_model_kind.cpp +0 -0
  316. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_model_limits.cpp +0 -0
  317. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_model_load.cpp +0 -0
  318. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_model_shapes.cpp +0 -0
  319. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_pace_yaml.cpp +0 -0
  320. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_uq.cpp +0 -0
  321. {grace_runtime-0.1.2 → grace_runtime-0.1.3}/tests/test_util.h +0 -0
@@ -3,6 +3,37 @@
3
3
  Notable changes of grace-runtime, grace-runtime-cuda12 and grace-runtime-rocm6 (they share one version). Each
4
4
  release has a section "Changed defaults" when a default behaves differently.
5
5
 
6
+ ## [0.1.3](https://github.com/ICAMS/grace-runtime/releases/tag/0.1.3) (2026-11-03)
7
+
8
+ Fixes, and the LAMMPS fork on the current stable LAMMPS.
9
+
10
+ ### Fixed
11
+
12
+ - macOS: when PyTorch from PyPI is loaded in the same process, two OpenMP runtimes are present and the process used to
13
+ abort with `OMP: Error #15`. grace-runtime now raises a `RuntimeError` that explains the conflict and how to install
14
+ PyTorch from conda-forge instead. (Not when `KMP_DUPLICATE_LIB_OK` is set, as with scikit-learn.)
15
+ - Python: setting or unsetting `GRACE_GENERIC_KERNELS` in a running process now takes effect with the next model
16
+ load on the GPU, with the warning. Before, a GPU model loaded earlier was reused and ran the generic kernels without
17
+ a warning, or kept them after the variable was unset.
18
+
19
+ ### LAMMPS (`grace-runtime` branch of the LAMMPS fork)
20
+
21
+ - Based on the stable LAMMPS release of 30 September 2026 (update 1, with Kokkos 5.2.1).
22
+ - `grace/runtime/kk`: GRACE-2L and GRACE-3L with `comm_style tiled` work with the device-side communication of this
23
+ LAMMPS version.
24
+ - `pace/kk`, `pace/extrapolation/kk`: the keyword `neigh` (`auto`, `shared`, `global`) selects where the short neighbor
25
+ list is kept on the GPU; with `auto` a list too large for on-chip memory uses global memory with a warning instead
26
+ of stopping the run. On a CPU backend, the styles no longer leak their per-atom energy and stress arrays.
27
+ - AMD GPUs: the bundled Kokkos is built with `Kokkos_ENABLE_IMPL_HIP_MALLOC_ASYNC=OFF`, so that `chunksize auto` sees
28
+ the freed GPU memory (with it on, GRACE-3L ran about 10 % slower on MI250X).
29
+ - With Kokkos 5.2.1, GRACE-1L and GRACE-2L-medium run about 2 % slower on an H200 than with the earlier Kokkos.
30
+
31
+ ### Changed defaults
32
+
33
+ - macOS: two OpenMP runtimes in one process raise a `RuntimeError` (see above).
34
+ - LAMMPS `pace/kk`: a short neighbor list that does not fit on-chip memory runs in global memory with a warning.
35
+ - LAMMPS, AMD GPUs: `Kokkos_ENABLE_IMPL_HIP_MALLOC_ASYNC` is OFF for the bundled Kokkos.
36
+
6
37
  ## [0.1.2](https://github.com/ICAMS/grace-runtime/releases/tag/0.1.2) (2026-11-01)
7
38
 
8
39
  The early GRACE-1L/2L models, and fast GPU kernels for more GRACE-1L/2L fits.
@@ -1,6 +1,6 @@
1
1
  Metadata-Version: 2.2
2
2
  Name: grace-runtime
3
- Version: 0.1.2
3
+ Version: 0.1.3
4
4
  Summary: Fast CPU and GPU inference of GRACE and PACE interatomic potentials with ASE, batching and TorchSim
5
5
  License: Academic Software License (ASL); bundled third-party code: see THIRD_PARTY_NOTICES.md
6
6
  Classifier: License :: Other/Proprietary License
@@ -30,7 +30,7 @@ cd lammps
30
30
  ## 2. Build
31
31
 
32
32
  The pair styles are part of the `ML-PACE` package. When CMake configures the build, it downloads grace-runtime
33
- 0.1.2 from GitHub, so the configure step needs network access. It also downloads the ML-PACE library. Pick one of the
33
+ 0.1.3 from GitHub, so the configure step needs network access. It also downloads the ML-PACE library. Pick one of the
34
34
  three recipes; run each from the `lammps` folder.
35
35
 
36
36
  ### CPU
@@ -91,6 +91,11 @@ cmake --build build-hip -j 8
91
91
  `GPU_TARGETS` names the same target as `Kokkos_ARCH_...` for ROCm's own CMake files, which otherwise warn and choose
92
92
  a default target when no GPU is visible (for example on a login node).
93
93
 
94
+ The fork builds its bundled Kokkos for HIP with `Kokkos_ENABLE_IMPL_HIP_MALLOC_ASYNC=OFF`. With that option on, memory
95
+ freed by Kokkos stays reserved and is not reported as free, and `chunksize auto` then chooses smaller chunks
96
+ (GRACE-3L runs about 10 % slower). If you build against your own Kokkos (`-D EXTERNAL_KOKKOS=yes`), configure it with
97
+ `-D Kokkos_ENABLE_IMPL_HIP_MALLOC_ASYNC=OFF` too.
98
+
94
99
  On HPE Cray systems (`PrgEnv-amd` with `cray-mpich`), also add `-D GRACE_BLAS=OFF`: the Cray compiler wrappers find
95
100
  a BLAS at configure time that `hipcc` does not link, and the link then fails with `undefined symbol: cblas_sgemm`. The
96
101
  setting affects only the CPU styles, which then use their built-in matrix product.
@@ -131,10 +136,10 @@ Other AMD GPUs ([GPU backends](backends.md#amd-rocm)):
131
136
 
132
137
  ### Without network access
133
138
 
134
- Download grace-runtime 0.1.2 on a machine with network access, copy it over and pass its path:
139
+ Download grace-runtime 0.1.3 on a machine with network access, copy it over and pass its path:
135
140
 
136
141
  ```bash
137
- git clone --depth 1 -b 0.1.2 https://github.com/ICAMS/grace-runtime.git
142
+ git clone --depth 1 -b 0.1.3 https://github.com/ICAMS/grace-runtime.git
138
143
  cmake -S cmake -B build-cpu ... -D LOCAL_GRACE_RUNTIME=$PWD/grace-runtime
139
144
  ```
140
145
 
@@ -4,7 +4,7 @@ build-backend = "scikit_build_core.build"
4
4
 
5
5
  [project]
6
6
  name = "grace-runtime"
7
- version = "0.1.2"
7
+ version = "0.1.3"
8
8
  description = "Fast CPU and GPU inference of GRACE and PACE interatomic potentials with ASE, batching and TorchSim"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
@@ -0,0 +1,91 @@
1
+ # SPDX-License-Identifier: LicenseRef-ASL (Academic Software Licence, see LICENSE.md)
2
+ """grace_runtime._core: the extension built for this CPU (see ``_dispatch``), re-exported under one name."""
3
+ import functools
4
+ import importlib
5
+ import os
6
+ import sys
7
+
8
+ from . import _dispatch, registry
9
+
10
+ cpu_module = _dispatch.select(_dispatch.cpu_flags(), os.environ.get("GRACE_RUNTIME_CPU"), _dispatch.available())
11
+ _ext = importlib.import_module(f"._core_{cpu_module}", __package__)
12
+ globals().update({k: v for k, v in vars(_ext).items() if not k.startswith("__")})
13
+
14
+
15
+ def _openmp_libraries() -> list:
16
+ """the OpenMP runtime files loaded in this process (macOS)"""
17
+ import ctypes
18
+ dyld = ctypes.CDLL(None)
19
+ dyld._dyld_get_image_name.restype = ctypes.c_char_p
20
+ names = (os.fsdecode(dyld._dyld_get_image_name(i) or b"") for i in range(dyld._dyld_image_count()))
21
+ return sorted({os.path.realpath(n) for n in names if os.path.basename(n) in ("libomp.dylib", "libiomp5.dylib")})
22
+
23
+
24
+ def _kmp_true(value: str) -> bool:
25
+ """libomp's __kmp_str_match_true: whether it reads `value` as true (KMP_DUPLICATE_LIB_OK)"""
26
+ value = value.lower()
27
+
28
+ def match(word, n): # __kmp_str_match: equal up to the shorter end, and at least n characters (n = 0: all)
29
+ i = len(os.path.commonprefix([word, value]))
30
+ if i < min(len(word), len(value)):
31
+ return False
32
+ return i >= n if n else i == len(word) == len(value)
33
+ return any(match(w, n) for w, n in (("true", 1), ("on", 2), ("1", 1), (".true.", 2), (".t.", 2), ("yes", 1),
34
+ ("enable", 0)))
35
+
36
+
37
+ @functools.cache # once it passed; a failure is checked again
38
+ def _check_openmp():
39
+ """macOS, before our first OpenMP call: two OpenMP runtimes in one process (PyTorch from PyPI ships its own) abort it
40
+ with "OMP: Error #15" when the second starts, unless KMP_DUPLICATE_LIB_OK is set (scikit-learn sets it); raise
41
+ instead. A runtime loaded after ours has started aborts in its own library (e.g. import torch), out of our reach."""
42
+ libs = _openmp_libraries()
43
+ if len(libs) > 1 and not _kmp_true(os.environ.get("KMP_DUPLICATE_LIB_OK", "")):
44
+ raise RuntimeError(f"two OpenMP runtimes in this process ({', '.join(libs)}): the process would abort with "
45
+ "'OMP: Error #15'. PyTorch from PyPI ships its own on macOS: install PyTorch from conda-forge "
46
+ "instead, which shares one runtime with grace-runtime; a source build in a conda environment: "
47
+ "build it with that environment activated (see the macOS section of the installation docs)")
48
+
49
+
50
+ def _after_openmp_check(fn):
51
+ @functools.wraps(fn)
52
+ def call(*args, **kwargs):
53
+ _check_openmp()
54
+ return fn(*args, **kwargs)
55
+ return call
56
+
57
+
58
+ class Model(_ext.Model):
59
+ """A loaded GRACE kokkos.npz or PACE .yaml model on the host, shared across calculators and batch calls.
60
+
61
+ path: a model file (GRACE kokkos.npz or PACE pacemaker B-basis .yaml) or a registry name (downloaded once into the
62
+ cache); a path with a directory, .npz or .yaml / .yml is never looked up in the registry. A PACE .yaml is
63
+ converted to its C-tilde basis on the fly when loaded.
64
+ spline: intervals of the radial tables (default 1024) on CPU and GPU; for PACE models also 0 (direct radial
65
+ evaluation).
66
+ store_max_gb: CPU limit in GB for keeping per-atom forward tensors of GRACE-2L / 3L (~64 KB/atom for
67
+ GRACE-2L-OMAT-medium); above it the backward pass recomputes them (same results, ~10% slower, warns once).
68
+ Default None: half the available host memory, within the memory limit of the job (e.g. Slurm --mem).
69
+ asi: active-set file (pacemaker .asi) of a PACE .yaml, enabling the extrapolation grade gamma (uq=True).
70
+ """
71
+
72
+ def __init__(self, path, *args, asi=None, **kwargs):
73
+ path = os.fspath(path)
74
+ if asi is not None:
75
+ asi = os.fspath(asi)
76
+ if not path.endswith((".yaml", ".yml")):
77
+ raise ValueError("asi= goes with a PACE .yaml")
78
+ elif os.sep not in path and not path.endswith((".npz", ".yaml", ".yml")):
79
+ path = registry.resolve(path)
80
+ super().__init__(path, *args, **({} if asi is None else {"asi": asi}), **kwargs)
81
+
82
+
83
+ if sys.platform == "darwin": # any call into the extension may start our OpenMP runtime: check before the first
84
+ for _k, _v in vars(_ext).items():
85
+ if callable(_v) and not _k.startswith("__") and not isinstance(_v, type):
86
+ globals()[_k] = _after_openmp_check(_v)
87
+ for _k, _v in vars(_ext.Model).items():
88
+ if callable(_v) and not _k.startswith("__"):
89
+ setattr(Model, _k, _after_openmp_check(_v))
90
+ Model.__init__ = _after_openmp_check(Model.__init__)
91
+ del _k, _v
@@ -16,7 +16,7 @@ from ._core import Model
16
16
  from .dispersion import resolve as _resolve_dispersion
17
17
  from .neighbors import NeighborList, _padded_cell, check_skin
18
18
 
19
- _KK_MODELS = {} # path -> GPU model (weights loaded once per process)
19
+ _KK_MODELS = {} # _kk_model_key -> GPU model (weights loaded once per process)
20
20
  _KK_LOCK = threading.Lock() # guards _KK_MODELS and grace_runtime.batch's Batch cache
21
21
  _KK_CALCS = weakref.WeakSet() # live GPU calculators (grace_runtime.free_gpu_memory() returns their buffers)
22
22
  _STORE_WARNED = set() # model paths whose CPU reverse pass recomputes instead of storing (warned once per model)
@@ -71,8 +71,11 @@ def _cpu_fallback(why: str):
71
71
 
72
72
 
73
73
  def _kk_model_key(model) -> str:
74
+ """GRACE_GENERIC_KERNELS is part of the key: a GPU model sets up its engine (and warns) for the value at its load"""
74
75
  asi = getattr(model, "asi", None)
75
- return f"{model.path}\0{asi}" if asi else model.path
76
+ key = f"{model.path}\0{asi}" if asi else model.path
77
+ generic = os.environ.get("GRACE_GENERIC_KERNELS")
78
+ return f"{key}\0{generic}" if generic is not None else key
76
79
 
77
80
 
78
81
  def _load_kk_model(kk, model):
@@ -50,16 +50,25 @@ def test_environment_overrides_auto(monkeypatch):
50
50
 
51
51
 
52
52
  @pytest.mark.skipif(not UNSUPPORTED.exists(), reason="unsupported test model absent")
53
- def test_auto_falls_back_for_a_model_outside_the_fused_kernels(monkeypatch):
53
+ def test_auto_stays_on_the_gpu_for_a_model_outside_the_compiled_kernels(monkeypatch):
54
+ """a GRACE-2L model wider than every compiled width set: "auto" raises (naming GRACE_GENERIC_KERNELS=1) instead of
55
+ taking the CPU; with the variable it runs the model on the generic GPU kernels, with a warning, as the CPU"""
54
56
  monkeypatch.delenv("GRACE_RUNTIME_DEVICE", raising=False)
55
- with pytest.warns(RuntimeWarning, match="fused GPU kernels"):
56
- calc = GRACERuntimeCalculator(str(UNSUPPORTED))
57
- assert calc.backend == "cpu"
58
- with pytest.raises(ValueError, match=f"not supported on device='{PLATFORM}'"):
57
+ monkeypatch.delenv("GRACE_GENERIC_KERNELS", raising=False)
58
+ with pytest.raises(ValueError, match="GRACE_GENERIC_KERNELS=1"):
59
+ GRACERuntimeCalculator(str(UNSUPPORTED))
60
+ with pytest.raises(ValueError, match="GRACE_GENERIC_KERNELS=1"):
59
61
  GRACERuntimeCalculator(str(UNSUPPORTED), device=GPU).get_potential_energy(wmo54())
60
- with pytest.warns(RuntimeWarning, match="fused GPU kernels"):
61
- r = compute_batch(str(UNSUPPORTED), [wmo54()])
62
- assert "energy" in r[0]
62
+ with pytest.raises(ValueError, match="GRACE_GENERIC_KERNELS=1"):
63
+ compute_batch(str(UNSUPPORTED), [wmo54()])
64
+ monkeypatch.setenv("GRACE_GENERIC_KERNELS", "1")
65
+ at, ref = wmo54(), wmo54()
66
+ with pytest.warns(RuntimeWarning, match="generic GPU kernels"):
67
+ at.calc = GRACERuntimeCalculator(str(UNSUPPORTED))
68
+ assert at.calc.backend.startswith(PLATFORM + ":"), at.calc.backend
69
+ ref.calc = GRACERuntimeCalculator(str(UNSUPPORTED), device="cpu")
70
+ assert abs(at.get_potential_energy() - ref.get_potential_energy()) <= 1e-5 * len(at)
71
+ assert np.abs(at.get_forces() - ref.get_forces()).max() <= 1e-4
63
72
 
64
73
 
65
74
  def test_auto_falls_back_without_a_module_for_the_gpu():
@@ -0,0 +1,66 @@
1
+ # SPDX-License-Identifier: LicenseRef-ASL (Academic Software Licence, see LICENSE.md)
2
+ """macOS: a second OpenMP runtime in the process (PyTorch from PyPI) gives a RuntimeError at our first call into the
3
+ extension instead of the abort "OMP: Error #15"; the libraries loaded are faked here."""
4
+ import sys
5
+
6
+ import numpy as np
7
+ import pytest
8
+
9
+ from grace_runtime import _core
10
+
11
+ TWO = ["/env/lib/libomp.dylib", "/env/lib/python3.12/site-packages/torch/lib/libomp.dylib"]
12
+ macos = pytest.mark.skipif(sys.platform != "darwin", reason="the OpenMP check runs on macOS only")
13
+
14
+
15
+ @pytest.fixture
16
+ def unchecked(monkeypatch):
17
+ _core._check_openmp.cache_clear()
18
+ monkeypatch.delenv("KMP_DUPLICATE_LIB_OK", raising=False)
19
+ yield monkeypatch
20
+ _core._check_openmp.cache_clear()
21
+
22
+
23
+ def test_two_runtimes_raise(unchecked):
24
+ unchecked.setattr(_core, "_openmp_libraries", lambda: TWO)
25
+ for _ in range(2): # a failure is checked again
26
+ with pytest.raises(RuntimeError, match="two OpenMP runtimes .*torch/lib/libomp.dylib.*conda-forge"):
27
+ _core._check_openmp()
28
+
29
+
30
+ @pytest.mark.parametrize("libs, env", [(TWO[:1], None), ([], None), (TWO, "True"), (TWO, "1"), (TWO, "y")])
31
+ def test_one_runtime_or_duplicates_allowed(unchecked, libs, env):
32
+ unchecked.setattr(_core, "_openmp_libraries", lambda: libs)
33
+ if env:
34
+ unchecked.setenv("KMP_DUPLICATE_LIB_OK", env) # libomp does not abort then (scikit-learn sets it)
35
+ _core._check_openmp()
36
+ unchecked.setattr(_core, "_openmp_libraries", lambda: TWO)
37
+ unchecked.delenv("KMP_DUPLICATE_LIB_OK", raising=False)
38
+ _core._check_openmp() # checked once: a runtime loaded after ours has started is out of reach
39
+
40
+
41
+ @pytest.mark.parametrize("value, true", [("TRUE", True), ("t", True), ("tr", True), ("on", True), ("o", False),
42
+ ("1", True), (".TRUE.", True), (".t.", True), ("y", True), ("enable", True),
43
+ ("enabl", False), ("", False), ("0", False), ("false", False), ("no", False)])
44
+ def test_kmp_true_reads_values_as_libomp(value, true):
45
+ assert _core._kmp_true(value) is true
46
+
47
+
48
+ @macos
49
+ def test_every_call_into_the_extension_checks(unchecked, models):
50
+ unchecked.setattr(_core, "_openmp_libraries", lambda: TWO)
51
+ with pytest.raises(RuntimeError, match="two OpenMP runtimes"):
52
+ _core.neighbor_search(np.zeros((1, 3)), np.eye(3) * 5, np.ones(3, dtype=bool), 3.0)
53
+ unchecked.setattr(_core, "_openmp_libraries", lambda: TWO[:1])
54
+ model = _core.Model(models["3l"]) # GRACE-3L: cutoff_matrix starts OpenMP (the network tables)
55
+ _core._check_openmp.cache_clear()
56
+ unchecked.setattr(_core, "_openmp_libraries", lambda: TWO)
57
+ with pytest.raises(RuntimeError, match="two OpenMP runtimes"):
58
+ model.cutoff_matrix(["W"])
59
+ for k, v in [*vars(_core._ext).items(), *vars(_core._ext.Model).items()]:
60
+ if callable(v) and not k.startswith("__") and not isinstance(v, type):
61
+ assert getattr(_core.Model if k in vars(_core._ext.Model) else _core, k).__wrapped__ is v, k
62
+
63
+
64
+ @macos
65
+ def test_the_loaded_runtime_is_found():
66
+ assert len(_core._openmp_libraries()) == 1
@@ -4,13 +4,13 @@ build-backend = "scikit_build_core.build"
4
4
 
5
5
  [project]
6
6
  name = "grace-runtime-cuda12"
7
- version = "0.1.2" # = grace-runtime (scripts/build_cuda_wheels.sh sets both from the repository pyproject)
7
+ version = "0.1.3" # = grace-runtime (scripts/build_cuda_wheels.sh sets both from the repository pyproject)
8
8
  description = "NVIDIA GPU backend (CUDA 12) of grace-runtime: fused GRACE-1L/2L/3L Kokkos kernels for V100, RTX 20xx/30xx/40xx/50xx, A100/A30, L40S, H100/H200, B200/B300"
9
9
  readme = "README.md"
10
10
  requires-python = ">=3.10"
11
11
  license = { text = "Academic Software License (ASL); bundled third-party code (Kokkos: Apache-2.0 WITH LLVM-exception): see THIRD_PARTY_NOTICES.md" }
12
12
  classifiers = ["License :: Other/Proprietary License"]
13
- dependencies = ["grace-runtime==0.1.2"]
13
+ dependencies = ["grace-runtime==0.1.3"]
14
14
 
15
15
  [project.urls]
16
16
  Homepage = "https://github.com/ICAMS/grace-runtime"
@@ -1,35 +0,0 @@
1
- # SPDX-License-Identifier: LicenseRef-ASL (Academic Software Licence, see LICENSE.md)
2
- """grace_runtime._core: the extension built for this CPU (see ``_dispatch``), re-exported under one name."""
3
- import importlib
4
- import os
5
-
6
- from . import _dispatch, registry
7
-
8
- cpu_module = _dispatch.select(_dispatch.cpu_flags(), os.environ.get("GRACE_RUNTIME_CPU"), _dispatch.available())
9
- _ext = importlib.import_module(f"._core_{cpu_module}", __package__)
10
- globals().update({k: v for k, v in vars(_ext).items() if not k.startswith("__")})
11
-
12
-
13
- class Model(_ext.Model):
14
- """A loaded GRACE kokkos.npz or PACE .yaml model on the host, shared across calculators and batch calls.
15
-
16
- path: a model file (GRACE kokkos.npz or PACE pacemaker B-basis .yaml) or a registry name (downloaded once into the
17
- cache); a path with a directory, .npz or .yaml / .yml is never looked up in the registry. A PACE .yaml is
18
- converted to its C-tilde basis on the fly when loaded.
19
- spline: intervals of the radial tables (default 1024) on CPU and GPU; for PACE models also 0 (direct radial
20
- evaluation).
21
- store_max_gb: CPU limit in GB for keeping per-atom forward tensors of GRACE-2L / 3L (~64 KB/atom for
22
- GRACE-2L-OMAT-medium); above it the backward pass recomputes them (same results, ~10% slower, warns once).
23
- Default None: half the available host memory, within the memory limit of the job (e.g. Slurm --mem).
24
- asi: active-set file (pacemaker .asi) of a PACE .yaml, enabling the extrapolation grade gamma (uq=True).
25
- """
26
-
27
- def __init__(self, path, *args, asi=None, **kwargs):
28
- path = os.fspath(path)
29
- if asi is not None:
30
- asi = os.fspath(asi)
31
- if not path.endswith((".yaml", ".yml")):
32
- raise ValueError("asi= goes with a PACE .yaml")
33
- elif os.sep not in path and not path.endswith((".npz", ".yaml", ".yml")):
34
- path = registry.resolve(path)
35
- super().__init__(path, *args, **({} if asi is None else {"asi": asi}), **kwargs)
File without changes
File without changes
File without changes
File without changes