kernelforge 0.3.0__tar.gz → 1.0.0__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.
- kernelforge-1.0.0/.github/workflows/ci.yml +111 -0
- kernelforge-1.0.0/.github/workflows/release.yml +216 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/.gitignore +22 -1
- {kernelforge-0.3.0 → kernelforge-1.0.0}/.pre-commit-config.yaml +1 -1
- kernelforge-1.0.0/AGENTS.md +161 -0
- kernelforge-1.0.0/CHANGELOG.md +19 -0
- kernelforge-1.0.0/CMakeLists.txt +576 -0
- kernelforge-1.0.0/Makefile +99 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/PKG-INFO +103 -26
- {kernelforge-0.3.0 → kernelforge-1.0.0}/README.md +93 -22
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/krr_energy_only.py +3 -5
- kernelforge-1.0.0/examples/model_api_qm7b_energy_only.py +113 -0
- kernelforge-1.0.0/examples/model_api_small_mols_energy_and_force.py +108 -0
- kernelforge-1.0.0/examples/model_api_small_mols_fchl18_energy_and_force.py +125 -0
- kernelforge-1.0.0/examples/model_api_small_mols_rff_energy_and_force.py +124 -0
- kernelforge-1.0.0/examples/run_md_rmd17_azobenzene_krr.py +114 -0
- kernelforge-1.0.0/examples/run_md_rmd17_azobenzene_rff.py +123 -0
- kernelforge-1.0.0/examples/run_md_rmd17_ethanol.py +107 -0
- kernelforge-1.0.0/examples/run_opt_rmd17_aspirin_krr.py +106 -0
- kernelforge-1.0.0/examples/run_opt_rmd17_aspirin_rff.py +114 -0
- kernelforge-1.0.0/examples/small_mols_mini_test.npz +0 -0
- kernelforge-1.0.0/examples/small_mols_mini_train.npz +0 -0
- kernelforge-1.0.0/examples/traj_to_sdf_rdkit.py +106 -0
- kernelforge-1.0.0/packaging/kernelforge-cuda/README.md +32 -0
- kernelforge-1.0.0/packaging/kernelforge-cuda/pyproject.toml +69 -0
- kernelforge-1.0.0/packaging/kernelforge-cuda/smoke_imports.py +37 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/pyproject.toml +29 -4
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/__init__.py +10 -0
- kernelforge-1.0.0/python/kernelforge/_cuda_hints.py +10 -0
- kernelforge-1.0.0/python/kernelforge/ase_calculator.py +174 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/cli.py +756 -0
- kernelforge-1.0.0/python/kernelforge/cuda_fchl18_kernel.pyi +454 -0
- kernelforge-1.0.0/python/kernelforge/cuda_fchl18_repr.pyi +32 -0
- kernelforge-1.0.0/python/kernelforge/cuda_fchl19_repr.pyi +103 -0
- kernelforge-1.0.0/python/kernelforge/cuda_global_kernels.pyi +183 -0
- kernelforge-1.0.0/python/kernelforge/cuda_invdist_repr.pyi +51 -0
- kernelforge-1.0.0/python/kernelforge/cuda_local_kernels.pyi +376 -0
- kernelforge-1.0.0/python/kernelforge/cuda_rff_features.pyi +173 -0
- kernelforge-1.0.0/python/kernelforge/cuda_solvers.pyi +73 -0
- kernelforge-1.0.0/python/kernelforge/fchl19v2_repr.pyi +67 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/global_kernels.pyi +28 -3
- kernelforge-1.0.0/python/kernelforge/kernelcli.py +1062 -0
- kernelforge-1.0.0/python/kernelforge/kernelmd.py +255 -0
- kernelforge-1.0.0/python/kernelforge/local_kernels.pyi +218 -0
- kernelforge-1.0.0/python/kernelforge/md.py +189 -0
- kernelforge-1.0.0/python/kernelforge/models/__init__.py +60 -0
- kernelforge-1.0.0/python/kernelforge/models/base.py +424 -0
- kernelforge-1.0.0/python/kernelforge/models/cuda_fchl18_krr.py +478 -0
- kernelforge-1.0.0/python/kernelforge/models/cuda_global_krr.py +648 -0
- kernelforge-1.0.0/python/kernelforge/models/cuda_global_rff.py +428 -0
- kernelforge-1.0.0/python/kernelforge/models/cuda_local_krr.py +1213 -0
- kernelforge-1.0.0/python/kernelforge/models/cuda_local_rff.py +928 -0
- kernelforge-1.0.0/python/kernelforge/models/fchl18_krr.py +295 -0
- kernelforge-1.0.0/python/kernelforge/models/global_krr.py +313 -0
- kernelforge-1.0.0/python/kernelforge/models/global_rff.py +248 -0
- kernelforge-1.0.0/python/kernelforge/models/krr.py +324 -0
- kernelforge-1.0.0/python/kernelforge/models/representations.py +201 -0
- kernelforge-1.0.0/python/kernelforge/models/rff.py +299 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/blas_config.h +2 -2
- kernelforge-1.0.0/src/cuda_fchl18_common.cuh +169 -0
- kernelforge-1.0.0/src/cuda_fchl18_full.cu +757 -0
- kernelforge-1.0.0/src/cuda_fchl18_hessian.cu +2086 -0
- kernelforge-1.0.0/src/cuda_fchl18_jacobian.cu +2385 -0
- kernelforge-1.0.0/src/cuda_fchl18_kernel.cu +1585 -0
- kernelforge-1.0.0/src/cuda_fchl18_kernel.hpp +588 -0
- kernelforge-1.0.0/src/cuda_fchl18_kernel_bindings.cpp +1785 -0
- kernelforge-1.0.0/src/cuda_fchl18_repr.cu +188 -0
- kernelforge-1.0.0/src/cuda_fchl18_repr.hpp +30 -0
- kernelforge-1.0.0/src/cuda_fchl18_repr_bindings.cpp +40 -0
- kernelforge-1.0.0/src/cuda_fchl19_repr.cu +1402 -0
- kernelforge-1.0.0/src/cuda_fchl19_repr.hpp +85 -0
- kernelforge-1.0.0/src/cuda_fchl19_repr_bindings.cpp +295 -0
- kernelforge-1.0.0/src/cuda_global_kernels.cu +995 -0
- kernelforge-1.0.0/src/cuda_global_kernels.hpp +137 -0
- kernelforge-1.0.0/src/cuda_global_kernels_bindings.cpp +462 -0
- kernelforge-1.0.0/src/cuda_invdist_repr.cu +206 -0
- kernelforge-1.0.0/src/cuda_invdist_repr.hpp +34 -0
- kernelforge-1.0.0/src/cuda_invdist_repr_bindings.cpp +52 -0
- kernelforge-1.0.0/src/cuda_local_kernels.cu +4101 -0
- kernelforge-1.0.0/src/cuda_local_kernels.hpp +309 -0
- kernelforge-1.0.0/src/cuda_local_kernels_bindings.cpp +1048 -0
- kernelforge-1.0.0/src/cuda_rff_features.cu +1993 -0
- kernelforge-1.0.0/src/cuda_rff_features.hpp +145 -0
- kernelforge-1.0.0/src/cuda_rff_features_bindings.cpp +192 -0
- kernelforge-1.0.0/src/cuda_solvers.cu +722 -0
- kernelforge-1.0.0/src/cuda_solvers.hpp +43 -0
- kernelforge-1.0.0/src/cuda_solvers_bindings.cpp +80 -0
- kernelforge-1.0.0/src/curfp.h +550 -0
- kernelforge-1.0.0/src/curfp_handle.cpp +51 -0
- kernelforge-1.0.0/src/curfp_internal.h +87 -0
- kernelforge-1.0.0/src/curfp_spftrf.cpp +292 -0
- kernelforge-1.0.0/src/curfp_spftrs.cpp +302 -0
- kernelforge-1.0.0/src/curfp_ssfr2.cpp +147 -0
- kernelforge-1.0.0/src/curfp_ssfrk.cpp +212 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_full_kernels.cpp +175 -267
- kernelforge-1.0.0/src/fchl18_hessian_kernels.cpp +81 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_jacobian_kernels.cpp +32 -65
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_kernel.cpp +1169 -694
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_kernel.hpp +53 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_kernel_bindings.cpp +65 -129
- kernelforge-1.0.0/src/fchl19v2_repr.cpp +2986 -0
- kernelforge-1.0.0/src/fchl19v2_repr.hpp +64 -0
- kernelforge-1.0.0/src/fchl19v2_repr_bindings.cpp +308 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/global_kernels.cpp +498 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/global_kernels.hpp +58 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/global_kernels_bindings.cpp +223 -8
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/local_kernels.cpp +625 -0
- kernelforge-1.0.0/src/local_kernels.hpp +232 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/local_kernels_bindings.cpp +355 -0
- kernelforge-1.0.0/tests/test_ase_calculator.py +409 -0
- kernelforge-1.0.0/tests/test_cuda_fchl18_full.py +287 -0
- kernelforge-1.0.0/tests/test_cuda_fchl18_gradient.py +148 -0
- kernelforge-1.0.0/tests/test_cuda_fchl18_hessian.py +387 -0
- kernelforge-1.0.0/tests/test_cuda_fchl18_jacobian.py +290 -0
- kernelforge-1.0.0/tests/test_cuda_fchl18_jacobian_t.py +211 -0
- kernelforge-1.0.0/tests/test_cuda_fchl18_kernel.py +315 -0
- kernelforge-1.0.0/tests/test_cuda_fchl18_repr.py +80 -0
- kernelforge-1.0.0/tests/test_cuda_fchl19_grad.py +252 -0
- kernelforge-1.0.0/tests/test_cuda_fchl19_repr.py +436 -0
- kernelforge-1.0.0/tests/test_cuda_global_krr.py +698 -0
- kernelforge-1.0.0/tests/test_cuda_global_rff.py +186 -0
- kernelforge-1.0.0/tests/test_cuda_invdist_repr.py +303 -0
- kernelforge-1.0.0/tests/test_cuda_local_krr.py +794 -0
- kernelforge-1.0.0/tests/test_cuda_local_rff.py +450 -0
- kernelforge-1.0.0/tests/test_cuda_rff_features.py +507 -0
- kernelforge-1.0.0/tests/test_cuda_rfp_potrf.py +66 -0
- kernelforge-1.0.0/tests/test_cuda_solvers.py +502 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18_full_kernels.py +74 -9
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18_hessian.py +10 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl19.py +26 -4
- kernelforge-1.0.0/tests/test_fchl19v2.py +759 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_full_kernel.py +18 -20
- kernelforge-1.0.0/tests/test_hessian_matvec.py +149 -0
- kernelforge-1.0.0/tests/test_jacobian_t_matvec.py +278 -0
- kernelforge-1.0.0/tests/test_kernelcli.py +646 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_kernels.py +19 -17
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_kitchen_sinks.py +1 -1
- kernelforge-1.0.0/tests/test_local_hessian_matvec.py +321 -0
- kernelforge-1.0.0/tests/test_local_jacobian_t_matvec.py +316 -0
- kernelforge-1.0.0/tests/test_models_cuda_fchl18.py +189 -0
- kernelforge-1.0.0/tests/test_models_fchl18.py +175 -0
- kernelforge-1.0.0/tests/test_models_global.py +279 -0
- kernelforge-1.0.0/tests/test_models_krr.py +413 -0
- kernelforge-1.0.0/tests/test_models_rff.py +168 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_rfp.py +13 -14
- kernelforge-1.0.0/wheelhouse/kernelforge-1.0.0-cp310-cp310-macosx_26_0_arm64.whl +0 -0
- kernelforge-1.0.0/wheelhouse/kernelforge-1.0.0-cp311-cp311-macosx_26_0_arm64.whl +0 -0
- kernelforge-1.0.0/wheelhouse/kernelforge-1.0.0-cp312-cp312-macosx_26_0_arm64.whl +0 -0
- kernelforge-1.0.0/wheelhouse/kernelforge-1.0.0-cp313-cp313-macosx_26_0_arm64.whl +0 -0
- kernelforge-1.0.0/wheelhouse/kernelforge-1.0.0-cp314-cp314-macosx_26_0_arm64.whl +0 -0
- kernelforge-1.0.0/wheelhouse/kernelforge-1.0.0-cp315-cp315-macosx_26_0_arm64.whl +0 -0
- kernelforge-0.3.0/.github/workflows/ci.yml +0 -70
- kernelforge-0.3.0/.github/workflows/code-quality.yml +0 -43
- kernelforge-0.3.0/.github/workflows/release.yml +0 -116
- kernelforge-0.3.0/AGENTS.md +0 -15
- kernelforge-0.3.0/CMakeLists.txt +0 -238
- kernelforge-0.3.0/Makefile +0 -59
- kernelforge-0.3.0/examples/ethanol.sdf +0 -22
- kernelforge-0.3.0/examples/regression_ethanol-Copy1.ipynb +0 -359
- kernelforge-0.3.0/python/kernelforge/local_kernels.pyi +0 -114
- kernelforge-0.3.0/src/fchl18_hessian_kernels.cpp +0 -136
- kernelforge-0.3.0/src/local_kernels.hpp +0 -124
- kernelforge-0.3.0/wheelhouse/kernelforge-0.3.0-cp310-cp310-macosx_15_0_arm64.whl +0 -0
- kernelforge-0.3.0/wheelhouse/kernelforge-0.3.0-cp311-cp311-macosx_15_0_arm64.whl +0 -0
- kernelforge-0.3.0/wheelhouse/kernelforge-0.3.0-cp312-cp312-macosx_15_0_arm64.whl +0 -0
- kernelforge-0.3.0/wheelhouse/kernelforge-0.3.0-cp313-cp313-macosx_15_0_arm64.whl +0 -0
- kernelforge-0.3.0/wheelhouse/kernelforge-0.3.0-cp314-cp314-macosx_15_0_arm64.whl +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/.clang-format +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/.clang-tidy +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/.github/dependabot.yml +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/LICENSE +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/desc_hess-gauss.ipynb +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/desc_hess.ipynb +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl18_krr_energy_and_force.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl18_krr_energy_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl18_krr_force_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl18_qmllib_krr_energy_and_force.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl18_qmllib_krr_energy_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl18_qmllib_krr_force_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl18_qmllib_parity_check.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl_example.ipynb +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/fchl_hess.ipynb +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/kernel_symm_rfp_large.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/krr_energy_and_force.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/krr_force_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/local_krr_energy_and_force.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/local_krr_energy_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/local_krr_force_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/local_rff_energy_and_force.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/local_rff_energy_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/local_rff_force_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/qm7_example.ipynb +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/qmllib_parity_check.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/regression_forces.ipynb +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/rff_direct_solve.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/rff_energy_and_force.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/rff_energy_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/rff_force_only.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/sgdml.ipynb +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/examples/test_fchl18_ablation.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/fchl18_kernel.pyi +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/fchl18_repr.pyi +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/fchl19_repr.pyi +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/invdist_repr.pyi +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/kernelmath.pyi +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/kitchen_sinks.pyi +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/python/kernelforge/py.typed +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/aligned_alloc64.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/blas_int.h +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/constants.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_full_kernels.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_hessian_kernels.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_jacobian_kernels.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_kernel_common.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_repr.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_repr.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_repr_bindings.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_scalar_kernels.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl18_scalar_kernels.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl19_repr.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl19_repr.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/fchl19_repr_bindings.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/invdist_repr.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/invdist_repr.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/invdist_repr_bindings.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/math.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/math.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/math_bindings.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/rff_elemental.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/rff_elemental.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/rff_elemental_bindings.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/rff_features.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/rff_features.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/rff_features_bindings.cpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/src/rfp_utils.hpp +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/__init__.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_cholesky.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18_gradient.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18_hessian_kernels.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18_integration.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18_jacobian_kernels.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl18_scalar_kernels.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl19_full_kernel.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl19_gradient.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_fchl19_hessian.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_hessian.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_hessian_rfp.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_invdist.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_jacobian.py +0 -0
- {kernelforge-0.3.0 → kernelforge-1.0.0}/tests/test_local_scalar_kernels.py +0 -0
|
@@ -0,0 +1,111 @@
|
|
|
1
|
+
name: CI
|
|
2
|
+
|
|
3
|
+
on:
|
|
4
|
+
push:
|
|
5
|
+
branches: [ master ]
|
|
6
|
+
pull_request:
|
|
7
|
+
|
|
8
|
+
permissions:
|
|
9
|
+
contents: read
|
|
10
|
+
|
|
11
|
+
concurrency:
|
|
12
|
+
group: ${{ github.workflow }}-${{ github.ref }}
|
|
13
|
+
cancel-in-progress: true
|
|
14
|
+
|
|
15
|
+
jobs:
|
|
16
|
+
lint:
|
|
17
|
+
name: code-quality
|
|
18
|
+
runs-on: ubuntu-26.04
|
|
19
|
+
steps:
|
|
20
|
+
- uses: actions/checkout@v6
|
|
21
|
+
|
|
22
|
+
- name: Set up uv
|
|
23
|
+
uses: astral-sh/setup-uv@v7
|
|
24
|
+
with:
|
|
25
|
+
enable-cache: true
|
|
26
|
+
|
|
27
|
+
- name: Set up Python
|
|
28
|
+
uses: actions/setup-python@v6
|
|
29
|
+
with:
|
|
30
|
+
python-version: "3.14"
|
|
31
|
+
|
|
32
|
+
- name: Install code quality tools
|
|
33
|
+
run: uv pip install --system ruff==0.16.1 ty==0.0.69 "numpy==2.4.4" pytest
|
|
34
|
+
|
|
35
|
+
- name: Check formatting with Ruff
|
|
36
|
+
run: ruff format --check python/ tests/
|
|
37
|
+
|
|
38
|
+
- name: Lint with Ruff
|
|
39
|
+
run: ruff check python/ tests/
|
|
40
|
+
|
|
41
|
+
- name: Type check with ty
|
|
42
|
+
run: ty check python/ tests/
|
|
43
|
+
|
|
44
|
+
test:
|
|
45
|
+
name: pytest (${{ matrix.os }} / py${{ matrix.python-version }})
|
|
46
|
+
needs: lint
|
|
47
|
+
runs-on: ${{ matrix.os }}
|
|
48
|
+
strategy:
|
|
49
|
+
fail-fast: false
|
|
50
|
+
matrix:
|
|
51
|
+
os: [ubuntu-26.04, macos-26]
|
|
52
|
+
python-version: ["3.14"]
|
|
53
|
+
|
|
54
|
+
steps:
|
|
55
|
+
- uses: actions/checkout@v6
|
|
56
|
+
|
|
57
|
+
- name: Install OpenMP (macOS only)
|
|
58
|
+
if: runner.os == 'macOS'
|
|
59
|
+
# libomp only — Apple Clang + Accelerate; skip Homebrew llvm (~2GB / ~40s).
|
|
60
|
+
run: brew install libomp
|
|
61
|
+
|
|
62
|
+
- name: Install OpenBLAS ILP64 + LAPACKE (Linux only)
|
|
63
|
+
if: runner.os == 'Linux'
|
|
64
|
+
run: sudo apt-get install -y libopenblas64-dev libopenblas64-pthread-dev liblapacke-dev
|
|
65
|
+
|
|
66
|
+
- name: Set up uv
|
|
67
|
+
uses: astral-sh/setup-uv@v7
|
|
68
|
+
with:
|
|
69
|
+
enable-cache: true
|
|
70
|
+
python-version: ${{ matrix.python-version }}
|
|
71
|
+
|
|
72
|
+
- name: Build & install (macOS only)
|
|
73
|
+
if: runner.os == 'macOS'
|
|
74
|
+
env:
|
|
75
|
+
OMP_NUM_THREADS: "1"
|
|
76
|
+
OPENBLAS_NUM_THREADS: "1"
|
|
77
|
+
CMAKE_PREFIX_PATH: /opt/homebrew/opt/libomp
|
|
78
|
+
run: |
|
|
79
|
+
# Apple Clang + Homebrew libomp + Accelerate (no Homebrew LLVM).
|
|
80
|
+
# OpenMP_* hints satisfy find_package(OpenMP) without changing CMakeLists.
|
|
81
|
+
export CMAKE_ARGS="-DKF_WITH_CUDA=OFF -DOpenMP_ROOT=/opt/homebrew/opt/libomp \
|
|
82
|
+
-DOpenMP_C_FLAGS=\"-Xclang -fopenmp -I/opt/homebrew/opt/libomp/include\" \
|
|
83
|
+
-DOpenMP_CXX_FLAGS=\"-Xclang -fopenmp -I/opt/homebrew/opt/libomp/include\" \
|
|
84
|
+
-DOpenMP_C_LIB_NAMES=omp \
|
|
85
|
+
-DOpenMP_CXX_LIB_NAMES=omp \
|
|
86
|
+
-DOpenMP_omp_LIBRARY=/opt/homebrew/opt/libomp/lib/libomp.dylib"
|
|
87
|
+
# Install deps only — avoid compiling the extension twice (uv sync + editable).
|
|
88
|
+
# Do not include the [cuda] extra here (builds the companion / needs nvcc).
|
|
89
|
+
uv sync --dev --extra test --extra ase --no-install-project
|
|
90
|
+
uv pip install scikit-build-core pybind11 setuptools-scm setuptools wheel
|
|
91
|
+
uv pip install -e . --no-build-isolation --no-deps
|
|
92
|
+
|
|
93
|
+
- name: Build & install (Linux only)
|
|
94
|
+
if: runner.os == 'Linux'
|
|
95
|
+
env:
|
|
96
|
+
OMP_NUM_THREADS: "1"
|
|
97
|
+
OPENBLAS_NUM_THREADS: "1"
|
|
98
|
+
CMAKE_ARGS: "-DKF_WITH_CUDA=OFF -DKF_BLAS_ILP64=ON"
|
|
99
|
+
run: |
|
|
100
|
+
# Install deps only — avoid compiling the extension twice (uv sync + editable).
|
|
101
|
+
# Do not include the [cuda] extra here (builds the companion / needs nvcc).
|
|
102
|
+
uv sync --dev --extra test --extra ase --no-install-project
|
|
103
|
+
uv pip install scikit-build-core pybind11 setuptools-scm setuptools wheel
|
|
104
|
+
uv pip install -e . --no-build-isolation --no-deps
|
|
105
|
+
|
|
106
|
+
|
|
107
|
+
- name: Run pytest
|
|
108
|
+
env:
|
|
109
|
+
OMP_NUM_THREADS: "1"
|
|
110
|
+
OPENBLAS_NUM_THREADS: "1"
|
|
111
|
+
run: uv run pytest -q -ra -k "not slow" -x
|
|
@@ -0,0 +1,216 @@
|
|
|
1
|
+
# .github/workflows/release.yml
|
|
2
|
+
name: "Build & Publish"
|
|
3
|
+
|
|
4
|
+
on:
|
|
5
|
+
release:
|
|
6
|
+
types: [published]
|
|
7
|
+
workflow_dispatch:
|
|
8
|
+
|
|
9
|
+
permissions:
|
|
10
|
+
contents: read
|
|
11
|
+
|
|
12
|
+
concurrency:
|
|
13
|
+
group: ${{ github.workflow }}
|
|
14
|
+
cancel-in-progress: true
|
|
15
|
+
|
|
16
|
+
jobs:
|
|
17
|
+
build-wheels:
|
|
18
|
+
runs-on: ${{ matrix.os }}
|
|
19
|
+
strategy:
|
|
20
|
+
fail-fast: false
|
|
21
|
+
matrix:
|
|
22
|
+
os: [ubuntu-26.04, macos-26]
|
|
23
|
+
|
|
24
|
+
steps:
|
|
25
|
+
- uses: actions/checkout@v6
|
|
26
|
+
with:
|
|
27
|
+
fetch-depth: 0 # Fetch all history for setuptools-scm to detect version from tags
|
|
28
|
+
|
|
29
|
+
- uses: actions/setup-python@v6
|
|
30
|
+
with:
|
|
31
|
+
python-version: "3.14" # host Python, cibuildwheel makes all others
|
|
32
|
+
|
|
33
|
+
- name: Clean wheelhouse and build artifacts
|
|
34
|
+
run: |
|
|
35
|
+
rm -rf dist/ build/ *.egg-info wheelhouse/
|
|
36
|
+
|
|
37
|
+
- name: Install GCC and OpenMP (macOS)
|
|
38
|
+
if: runner.os == 'macOS'
|
|
39
|
+
run: brew install gcc libomp
|
|
40
|
+
|
|
41
|
+
- name: Install cibuildwheel
|
|
42
|
+
run: python -m pip install cibuildwheel==4.2.0
|
|
43
|
+
|
|
44
|
+
- name: Build wheels
|
|
45
|
+
env:
|
|
46
|
+
CIBW_BUILD: "cp310-* cp311-* cp312-* cp313-* cp314-* cp315-*"
|
|
47
|
+
CIBW_SKIP: "pp* *-musllinux_* cp*-manylinux_i686 cp31?t-*"
|
|
48
|
+
# examples/ is not shipped in the wheel; point tests at the checkout.
|
|
49
|
+
CIBW_TEST_COMMAND: >-
|
|
50
|
+
env KERNELFORGE_EXAMPLES_DIR={project}/examples
|
|
51
|
+
pytest -q {project}/tests -k 'not slow' -x
|
|
52
|
+
CIBW_TEST_EXTRAS: "test"
|
|
53
|
+
CIBW_ENVIRONMENT: >
|
|
54
|
+
OMP_NUM_THREADS=1
|
|
55
|
+
OPENBLAS_NUM_THREADS=1
|
|
56
|
+
CIBW_BEFORE_BUILD_LINUX: |
|
|
57
|
+
yum -y install openblas-devel
|
|
58
|
+
find /usr/include -name cblas.h -print
|
|
59
|
+
CIBW_ENVIRONMENT_LINUX: >
|
|
60
|
+
CPPFLAGS="-I/usr/include/openblas"
|
|
61
|
+
CFLAGS="-I/usr/include/openblas"
|
|
62
|
+
LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH"
|
|
63
|
+
CMAKE_ARGS="-DKF_WITH_CUDA=OFF -DBLAS_LIBRARIES=/usr/lib64/libopenblas.so -DBLAS_INCLUDE_DIR=/usr/include/openblas -DCMAKE_CXX_FLAGS=-I/usr/include/openblas -DCMAKE_C_FLAGS=-I/usr/include/openblas"
|
|
64
|
+
OPENBLAS_NUM_THREADS=1
|
|
65
|
+
OMP_NUM_THREADS=1
|
|
66
|
+
CIBW_ENVIRONMENT_PASS_LINUX: >
|
|
67
|
+
CPPFLAGS
|
|
68
|
+
CFLAGS
|
|
69
|
+
LD_LIBRARY_PATH
|
|
70
|
+
CMAKE_ARGS
|
|
71
|
+
OPENBLAS_NUM_THREADS
|
|
72
|
+
OMP_NUM_THREADS
|
|
73
|
+
CIBW_ENVIRONMENT_MACOS: >
|
|
74
|
+
MACOSX_DEPLOYMENT_TARGET=26.0
|
|
75
|
+
CMAKE_ARGS="-DKF_WITH_CUDA=OFF -DBLAS_VENDOR=Apple
|
|
76
|
+
-DCMAKE_CXX_FLAGS=-I/opt/homebrew/opt/libomp/include
|
|
77
|
+
-DCMAKE_C_FLAGS=-I/opt/homebrew/opt/libomp/include
|
|
78
|
+
-DCMAKE_SHARED_LINKER_FLAGS=-L/opt/homebrew/opt/libomp/lib
|
|
79
|
+
-DCMAKE_EXE_LINKER_FLAGS=-L/opt/homebrew/opt/libomp/lib"
|
|
80
|
+
CIBW_ENVIRONMENT_PASS_MACOS: >
|
|
81
|
+
MACOSX_DEPLOYMENT_TARGET
|
|
82
|
+
CMAKE_ARGS
|
|
83
|
+
CIBW_ARCHS_MACOS: arm64
|
|
84
|
+
run: python -m cibuildwheel --output-dir wheelhouse
|
|
85
|
+
|
|
86
|
+
- name: Build sdist
|
|
87
|
+
run: python -m pip install build && python -m build --sdist -o wheelhouse
|
|
88
|
+
|
|
89
|
+
- name: Upload artifacts
|
|
90
|
+
uses: actions/upload-artifact@v7
|
|
91
|
+
with:
|
|
92
|
+
name: wheels-${{ runner.os }}
|
|
93
|
+
path: wheelhouse/*
|
|
94
|
+
|
|
95
|
+
# Linux-only companion wheels (cuda_*.so). Hosted runners have no GPU;
|
|
96
|
+
# nvcc cross-compiles for TORCH_CUDA_ARCH_LIST. Do not run GPU tests here.
|
|
97
|
+
build-wheels-cuda:
|
|
98
|
+
runs-on: ubuntu-26.04
|
|
99
|
+
steps:
|
|
100
|
+
- uses: actions/checkout@v6
|
|
101
|
+
with:
|
|
102
|
+
fetch-depth: 0
|
|
103
|
+
|
|
104
|
+
- uses: actions/setup-python@v6
|
|
105
|
+
with:
|
|
106
|
+
python-version: "3.14"
|
|
107
|
+
|
|
108
|
+
- name: Clean wheelhouse
|
|
109
|
+
run: rm -rf wheelhouse-cuda/
|
|
110
|
+
|
|
111
|
+
- name: Install cibuildwheel
|
|
112
|
+
run: python -m pip install cibuildwheel==4.2.0
|
|
113
|
+
|
|
114
|
+
- name: Build kernelforge-cuda wheels
|
|
115
|
+
env:
|
|
116
|
+
# Match CUDA major across: manylinux image, torch wheel index, runtime.
|
|
117
|
+
CIBW_MANYLINUX_X86_64_IMAGE: >-
|
|
118
|
+
quay.io/manylinux_cuda/manylinux_2_28_x86_64_cuda13_1:latest
|
|
119
|
+
# CUDA companion: CPython 3.11–3.14 manylinux (CPU wheels cover 3.10–3.15).
|
|
120
|
+
CIBW_BUILD: "cp311-manylinux_x86_64 cp312-manylinux_x86_64 cp313-manylinux_x86_64 cp314-manylinux_x86_64"
|
|
121
|
+
CIBW_SKIP: "pp* *-musllinux_* *i686* cp31?t-*"
|
|
122
|
+
CIBW_ARCHS_LINUX: x86_64
|
|
123
|
+
# Companion has no in-tree tests; skip GPU pytest on hosted runners.
|
|
124
|
+
CIBW_TEST_SKIP: "*"
|
|
125
|
+
CIBW_BEFORE_ALL_LINUX: |
|
|
126
|
+
yum -y install openblas-devel || dnf -y install openblas-devel
|
|
127
|
+
# manylinux_cuda ships nvcc + a subset of math libs. Install the
|
|
128
|
+
# CUDA 13.1 libraries-devel meta-package so Torch/FindCUDAToolkit
|
|
129
|
+
# can resolve cusolver, nvrtc, etc. (avoids -l*-NOTFOUND link lines).
|
|
130
|
+
yum -y install cuda-libraries-devel-13-1 \
|
|
131
|
+
|| dnf -y install cuda-libraries-devel-13-1
|
|
132
|
+
CIBW_BEFORE_BUILD_LINUX: |
|
|
133
|
+
python -m pip install --upgrade pip
|
|
134
|
+
# Same CUDA major as the manylinux_cuda image (13.x → cu130).
|
|
135
|
+
python -m pip install torch --index-url https://download.pytorch.org/whl/cu130
|
|
136
|
+
CIBW_ENVIRONMENT_LINUX: >
|
|
137
|
+
OMP_NUM_THREADS=1
|
|
138
|
+
OPENBLAS_NUM_THREADS=1
|
|
139
|
+
CUDA_HOME=/usr/local/cuda
|
|
140
|
+
TORCH_CUDA_ARCH_LIST="7.5;8.0;8.6;8.9;9.0;10.0;12.0"
|
|
141
|
+
CPPFLAGS="-I/usr/include/openblas"
|
|
142
|
+
CFLAGS="-I/usr/include/openblas"
|
|
143
|
+
LD_LIBRARY_PATH="/usr/lib64:$LD_LIBRARY_PATH"
|
|
144
|
+
CMAKE_ARGS="-DKF_WITH_CUDA=ON -DKF_CUDA_ONLY=ON -DKF_BLAS_VENDOR=OpenBLAS -DBLAS_LIBRARIES=/usr/lib64/libopenblas.so -DBLAS_INCLUDE_DIR=/usr/include/openblas -DCMAKE_CXX_FLAGS=-I/usr/include/openblas -DCMAKE_C_FLAGS=-I/usr/include/openblas"
|
|
145
|
+
CIBW_ENVIRONMENT_PASS_LINUX: >
|
|
146
|
+
OMP_NUM_THREADS
|
|
147
|
+
OPENBLAS_NUM_THREADS
|
|
148
|
+
CUDA_HOME
|
|
149
|
+
TORCH_CUDA_ARCH_LIST
|
|
150
|
+
CPPFLAGS
|
|
151
|
+
CFLAGS
|
|
152
|
+
LD_LIBRARY_PATH
|
|
153
|
+
CMAKE_ARGS
|
|
154
|
+
# Do not vendor CUDA/Torch shared libs; users provide them via torch + driver.
|
|
155
|
+
CIBW_REPAIR_WHEEL_COMMAND_LINUX: >
|
|
156
|
+
auditwheel repair -w {dest_dir} {wheel}
|
|
157
|
+
--exclude libcuda.so.1
|
|
158
|
+
--exclude libnvidia-ml.so.1
|
|
159
|
+
--exclude libcudart.so.12
|
|
160
|
+
--exclude libcudart.so.13
|
|
161
|
+
--exclude libcudart.so.*
|
|
162
|
+
--exclude libcublas.so.*
|
|
163
|
+
--exclude libcublasLt.so.*
|
|
164
|
+
--exclude libcusolver.so.*
|
|
165
|
+
--exclude libcusparse.so.*
|
|
166
|
+
--exclude libnvJitLink.so.*
|
|
167
|
+
--exclude libnvrtc.so.*
|
|
168
|
+
--exclude libcupti.so.*
|
|
169
|
+
--exclude libc10.so
|
|
170
|
+
--exclude libc10_cuda.so
|
|
171
|
+
--exclude libtorch.so
|
|
172
|
+
--exclude libtorch_cpu.so
|
|
173
|
+
--exclude libtorch_cuda.so
|
|
174
|
+
--exclude libtorch_python.so
|
|
175
|
+
--exclude libgomp.so.1
|
|
176
|
+
run: python -m cibuildwheel packaging/kernelforge-cuda --output-dir wheelhouse-cuda
|
|
177
|
+
|
|
178
|
+
- name: Upload CUDA artifacts
|
|
179
|
+
uses: actions/upload-artifact@v7
|
|
180
|
+
with:
|
|
181
|
+
name: wheels-cuda-Linux
|
|
182
|
+
path: wheelhouse-cuda/*
|
|
183
|
+
|
|
184
|
+
publish:
|
|
185
|
+
needs: [build-wheels, build-wheels-cuda]
|
|
186
|
+
runs-on: ubuntu-26.04
|
|
187
|
+
if: github.event_name == 'release' || github.event_name == 'workflow_dispatch'
|
|
188
|
+
permissions:
|
|
189
|
+
id-token: write
|
|
190
|
+
steps:
|
|
191
|
+
- uses: actions/download-artifact@v8
|
|
192
|
+
with:
|
|
193
|
+
name: wheels-Linux
|
|
194
|
+
path: dist
|
|
195
|
+
|
|
196
|
+
- uses: actions/download-artifact@v8
|
|
197
|
+
with:
|
|
198
|
+
name: wheels-macOS
|
|
199
|
+
path: dist
|
|
200
|
+
|
|
201
|
+
- uses: actions/download-artifact@v8
|
|
202
|
+
with:
|
|
203
|
+
name: wheels-cuda-Linux
|
|
204
|
+
path: dist
|
|
205
|
+
|
|
206
|
+
- name: Flatten artifacts
|
|
207
|
+
run: |
|
|
208
|
+
mkdir -p dist/flat
|
|
209
|
+
find dist -name '*.whl' -exec cp {} dist/flat/ \;
|
|
210
|
+
find dist -name '*.tar.gz' -exec cp {} dist/flat/ \;
|
|
211
|
+
echo "Publishing packages:"
|
|
212
|
+
ls -la dist/flat
|
|
213
|
+
|
|
214
|
+
- uses: pypa/gh-action-pypi-publish@v1.14.2
|
|
215
|
+
with:
|
|
216
|
+
packages-dir: dist/flat
|
|
@@ -201,14 +201,35 @@ cython_debug/
|
|
|
201
201
|
# Cursor is an AI-powered code editor. `.cursorignore` specifies files/directories to
|
|
202
202
|
# exclude from AI features like autocomplete and code analysis. Recommended for sensitive data
|
|
203
203
|
# refer to https://docs.cursor.com/context/ignore-files
|
|
204
|
+
.cursor/
|
|
204
205
|
.cursorignore
|
|
205
206
|
.cursorindexingignore
|
|
206
207
|
|
|
208
|
+
# Local agent / IDE tool state (do not commit)
|
|
209
|
+
.claude/
|
|
210
|
+
.opencode/
|
|
211
|
+
|
|
207
212
|
# Marimo
|
|
208
213
|
marimo/_static/
|
|
209
214
|
marimo/_lsp/
|
|
210
215
|
__marimo__/
|
|
211
216
|
|
|
217
|
+
# Library: lockfile is machine/build specific; use Makefile + pyproject pins instead
|
|
212
218
|
uv.lock
|
|
213
219
|
|
|
214
|
-
|
|
220
|
+
|
|
221
|
+
# ASE / MD / optimization artifacts (repo root and ad-hoc runs)
|
|
222
|
+
/*.traj
|
|
223
|
+
/*.gif
|
|
224
|
+
/*.sdf
|
|
225
|
+
/*.extxyz
|
|
226
|
+
/*.log
|
|
227
|
+
*.tmp/
|
|
228
|
+
/*.tmp/
|
|
229
|
+
|
|
230
|
+
# Local scratch at repo root
|
|
231
|
+
/test.py
|
|
232
|
+
/test.sh
|
|
233
|
+
/test_ncu.sh
|
|
234
|
+
/sdf
|
|
235
|
+
|
|
@@ -0,0 +1,161 @@
|
|
|
1
|
+
# KernelForge — Agent Instructions
|
|
2
|
+
|
|
3
|
+
## Build & Install
|
|
4
|
+
|
|
5
|
+
Always use the Makefile. Never invoke CMake or pip directly.
|
|
6
|
+
|
|
7
|
+
### Linux (recommended: MKL + ILP64)
|
|
8
|
+
|
|
9
|
+
```bash
|
|
10
|
+
source /opt/intel/oneapi/setvars.sh # must be run first to enable MKL
|
|
11
|
+
make install-linux-mkl-ilp64
|
|
12
|
+
```
|
|
13
|
+
|
|
14
|
+
Other Linux targets: `install-linux-openblas-ilp64`, `install-linux-ilp64`, `install-linux`
|
|
15
|
+
|
|
16
|
+
### Linux with CUDA (optional)
|
|
17
|
+
|
|
18
|
+
Requires a CUDA toolkit, a GPU driver, and PyTorch discoverable by CMake.
|
|
19
|
+
The Makefile passes `-DKF_WITH_CUDA=ON` (CUDA is off by default for CPU builds):
|
|
20
|
+
|
|
21
|
+
```bash
|
|
22
|
+
source /opt/intel/oneapi/setvars.sh
|
|
23
|
+
make install-linux-mkl-ilp64-cuda
|
|
24
|
+
```
|
|
25
|
+
|
|
26
|
+
PyPI layout (CUDA companion wheels built on GHA ``build-wheels-cuda``):
|
|
27
|
+
|
|
28
|
+
- `kernelforge` — CPU wheels (`-DKF_WITH_CUDA=OFF`)
|
|
29
|
+
- `kernelforge-cuda` — Linux companion on PyPI that installs `cuda_*.so` into `kernelforge/`
|
|
30
|
+
(release wheels: **CPython 3.11–3.14** manylinux; CPU is 3.10–3.15)
|
|
31
|
+
- `pip install 'kernelforge[cuda]'` — pulls `torch` + `kernelforge-cuda` on Linux
|
|
32
|
+
(default-index torch may be CPU-only; install a CUDA torch build for GPU)
|
|
33
|
+
|
|
34
|
+
Local smoke: `make demo-cuda-wheels`. Metadata lives in
|
|
35
|
+
`packaging/kernelforge-cuda/pyproject.toml`.
|
|
36
|
+
|
|
37
|
+
### macOS (recommended: ILP64)
|
|
38
|
+
|
|
39
|
+
Requires Homebrew LLVM and OpenMP:
|
|
40
|
+
|
|
41
|
+
```bash
|
|
42
|
+
brew install llvm libomp
|
|
43
|
+
make install-macos-ilp64
|
|
44
|
+
```
|
|
45
|
+
|
|
46
|
+
The Makefile hard-codes `/opt/homebrew/opt/llvm/bin/clang{++}` as the compiler.
|
|
47
|
+
|
|
48
|
+
---
|
|
49
|
+
|
|
50
|
+
## Testing
|
|
51
|
+
|
|
52
|
+
```bash
|
|
53
|
+
make test # full test suite (uv run pytest)
|
|
54
|
+
```
|
|
55
|
+
|
|
56
|
+
To skip slow/integration tests (matches CI behavior):
|
|
57
|
+
|
|
58
|
+
```bash
|
|
59
|
+
uv run pytest -k "not slow" -x
|
|
60
|
+
```
|
|
61
|
+
|
|
62
|
+
Test markers defined in `pyproject.toml`: `integration` (requires external datasets), `slow`.
|
|
63
|
+
All test files live in `tests/`. When adding new functionality, add a corresponding test.
|
|
64
|
+
|
|
65
|
+
---
|
|
66
|
+
|
|
67
|
+
## Code Quality
|
|
68
|
+
|
|
69
|
+
Run all checks before committing:
|
|
70
|
+
|
|
71
|
+
```bash
|
|
72
|
+
make check # format + lint + typecheck
|
|
73
|
+
```
|
|
74
|
+
|
|
75
|
+
Individual targets:
|
|
76
|
+
|
|
77
|
+
| Command | Tool | Scope |
|
|
78
|
+
|------------------|-------------------|-----------------------------------|
|
|
79
|
+
| `make format` | ruff + clang-format | auto-fixes Python and C++ |
|
|
80
|
+
| `make lint` | ruff | lint-only, no auto-fix |
|
|
81
|
+
| `make typecheck` | ty | Python type checking |
|
|
82
|
+
| `make tidy` | clang-tidy | C++ static analysis |
|
|
83
|
+
|
|
84
|
+
Pre-commit hooks run automatically on `git commit` and auto-fix some issues (ruff, clang-format).
|
|
85
|
+
CI gates: `make check` (code-quality workflow) and `make test` (ci workflow) must both pass on every PR.
|
|
86
|
+
|
|
87
|
+
---
|
|
88
|
+
|
|
89
|
+
## Git & GitHub Workflow
|
|
90
|
+
|
|
91
|
+
- **Never commit directly to `master`**. Always work on a new branch.
|
|
92
|
+
- Before creating a branch, pull the latest `master`: `git pull origin master`
|
|
93
|
+
- Open a PR for all changes. CI must pass before merging.
|
|
94
|
+
- Pre-commit hooks must pass. Run `make check` and `make test` locally before pushing.
|
|
95
|
+
- **Never add AI / agent co-author trailers** (or equivalent attribution) to commits or
|
|
96
|
+
PRs. This includes Cursor, Claude, Copilot, ChatGPT, and similar tools — no
|
|
97
|
+
`Co-authored-by: …`, commit trailers, PR body credits, or other agent branding in
|
|
98
|
+
git history or GitHub metadata. Commits and PRs are authored by the human only.
|
|
99
|
+
|
|
100
|
+
---
|
|
101
|
+
|
|
102
|
+
## Architecture Overview
|
|
103
|
+
|
|
104
|
+
The library is a Python package (`kernelforge`) backed by C++17 extension modules built with
|
|
105
|
+
Pybind11 + scikit-build-core.
|
|
106
|
+
|
|
107
|
+
### Module groups
|
|
108
|
+
|
|
109
|
+
| Group | C++ sources | Python module | Purpose |
|
|
110
|
+
|-------|-------------|---------------|---------|
|
|
111
|
+
| Global kernels | `global_kernels.{cpp,hpp}` | `global_kernels` | Gaussian kernels for molecule-level descriptors (scalar, Jacobian, Hessian, full energy+force; RFP variants) |
|
|
112
|
+
| Local kernels | `local_kernels.{cpp,hpp}` | `local_kernels` | Same kernels for atom-centered descriptors (takes `Q`, `N` atom-count args) |
|
|
113
|
+
| FCHL18 kernel | `fchl18_kernel*.{cpp,hpp}` | `fchl18_kernel` | Full FCHL18 analytical kernel suite (scalar, Jacobian, Hessian, full, RFP) |
|
|
114
|
+
| Representations | `fchl18_repr.*`, `fchl19_repr.*`, `invdist_repr.*` | `fchl18_repr`, `fchl19_repr`, `invdist_repr` | Molecular descriptor generators + Jacobians |
|
|
115
|
+
| RFF / kitchen sinks | `rff_features.*`, `rff_elemental.*` | `kitchen_sinks` | Random Fourier Feature approximations to all kernels |
|
|
116
|
+
| Math / solvers | `math.{cpp,hpp}` | `kernelmath` | Cholesky, QR, SVD solvers; RFP format conversion; `get_blas_info()` |
|
|
117
|
+
| CUDA extensions (optional) | `cuda_*.{cu,hpp,_bindings.cpp}` | `cuda_global_kernels`, `cuda_local_kernels`, `cuda_fchl18_*`, `cuda_fchl19_repr`, `cuda_rff_features`, `cuda_invdist_repr`, `cuda_solvers` | Torch-backed GPU kernels/reprs; required by `Cuda*Model` classes |
|
|
118
|
+
| ASE / MD | Python only | `ase_calculator`, `md`, `kernelmd` | `KernelForgeCalculator`, `run_md()`, `kernelmd` CLI (`kernelforge[ase]`) |
|
|
119
|
+
|
|
120
|
+
Python shim: `python/kernelforge/__init__.py` re-exports everything from the C++ extension modules.
|
|
121
|
+
Type stubs: `python/kernelforge/*.pyi` — one per extension module.
|
|
122
|
+
High-level models live under `python/kernelforge/models/` (CPU + optional CUDA).
|
|
123
|
+
|
|
124
|
+
---
|
|
125
|
+
|
|
126
|
+
## C++ Conventions
|
|
127
|
+
|
|
128
|
+
- **Standard**: C++17. No exceptions beyond what Pybind11 uses.
|
|
129
|
+
- **BLAS integer type**: Always use `blas_int` (defined in `src/blas_int.h`), never plain `int` for
|
|
130
|
+
BLAS/LAPACK calls. This resolves to `int64_t` under ILP64 and `int` under LP64.
|
|
131
|
+
- **Formatting**: clang-format enforces Google style, 4-space indent, 100-char line limit. Run
|
|
132
|
+
`make format-cpp` or let the pre-commit hook handle it.
|
|
133
|
+
- **Static analysis**: `make tidy` runs clang-tidy. Magic-number and pointer-arithmetic warnings are
|
|
134
|
+
suppressed for BLAS code (configured in `.clang-tidy`).
|
|
135
|
+
- **Header utilities**: Use `aligned_alloc64.hpp` for 64-byte aligned allocation, `rfp_utils.hpp`
|
|
136
|
+
for RFP packed format helpers, `constants.hpp` for physical constants.
|
|
137
|
+
|
|
138
|
+
### Adding a new extension module
|
|
139
|
+
|
|
140
|
+
Each module requires three files plus a CMakeLists.txt entry:
|
|
141
|
+
|
|
142
|
+
1. `src/<name>.{cpp,hpp}` — implementation
|
|
143
|
+
2. `src/<name>_bindings.cpp` — Pybind11 `PYBIND11_MODULE` definition
|
|
144
|
+
3. `python/kernelforge/<name>.pyi` — type stub (must match the bindings exactly)
|
|
145
|
+
4. Add to `CMakeLists.txt`: `pybind11_add_module(...)` + `target_link_libraries(...)` for BLAS
|
|
146
|
+
5. Re-export in `python/kernelforge/__init__.py`
|
|
147
|
+
|
|
148
|
+
---
|
|
149
|
+
|
|
150
|
+
## Python Conventions
|
|
151
|
+
|
|
152
|
+
- **Type annotations**: Required on all functions (ruff `ANN` rules enforced). Use `numpy.ndarray`
|
|
153
|
+
for arrays; follow existing `.pyi` stubs for dtype conventions.
|
|
154
|
+
- **Type checker**: `ty` (Astral). Not mypy. Run with `make typecheck`.
|
|
155
|
+
- **Formatter/linter**: `ruff` (see `pyproject.toml` pin). Run `make format` to auto-fix,
|
|
156
|
+
`make lint` to check.
|
|
157
|
+
- **Path handling**: Use `pathlib.Path`, not `os.path` (ruff `PTH` rule enforced).
|
|
158
|
+
- **Uppercase variable names** (`X`, `K`, `Q`, `N`) are intentional in scientific code — ruff rules
|
|
159
|
+
N802/N803/N806 are suppressed.
|
|
160
|
+
- **`.pyi` stubs**: Keep in sync with C++ bindings. When modifying `*_bindings.cpp`, update the
|
|
161
|
+
corresponding `.pyi` file.
|
|
@@ -0,0 +1,19 @@
|
|
|
1
|
+
# Changelog
|
|
2
|
+
|
|
3
|
+
## 1.0.0
|
|
4
|
+
|
|
5
|
+
First stable release.
|
|
6
|
+
|
|
7
|
+
### Packaging
|
|
8
|
+
|
|
9
|
+
- CPU wheels (`kernelforge`): Linux + macOS for CPython **3.10–3.15**
|
|
10
|
+
- CUDA companion (`kernelforge-cuda`): Linux manylinux for CPython **3.11–3.14**
|
|
11
|
+
- `kernelforge[cuda]` pulls the companion on Linux for Python 3.11–3.14
|
|
12
|
+
|
|
13
|
+
### Highlights since 0.3.x
|
|
14
|
+
|
|
15
|
+
- ASE molecular dynamics / optimization via `kernelmd` and model calculators
|
|
16
|
+
- CUDA packaging split: CPU `kernelforge` + companion `kernelforge-cuda` on PyPI
|
|
17
|
+
- CUDA `force_only` for local/global KRR and RFF models
|
|
18
|
+
- FCHL18 CUDA KRR: full float32 path with GPU `rfp_potrf` (`uplo=U`)
|
|
19
|
+
- CLI: `--cuda`, `--dtype float32|float64` (FCHL18), force-only modes
|