{"id":21903223,"url":"https://github.com/grinisrit/noa","last_synced_at":"2025-04-04T19:09:22.813Z","repository":{"id":37073289,"uuid":"295951301","full_name":"grinisrit/noa","owner":"grinisrit","description":"Differentiable Programming Algorithms in Modern C++","archived":false,"fork":false,"pushed_at":"2024-10-29T10:17:56.000Z","size":164989,"stargazers_count":135,"open_issues_count":0,"forks_count":27,"subscribers_count":4,"default_branch":"master","last_synced_at":"2024-10-29T12:18:51.637Z","etag":null,"topics":["algorithmic-trading","bayesian-methods","cpp17","deep-learning","differentiable-programming","game-development","optimisation-algorithms","optimization","particle-physics","simulation","streaming-analytics"],"latest_commit_sha":null,"homepage":"https://www.grinisrit.com","language":"C++","has_issues":true,"has_wiki":null,"has_pages":null,"mirror_url":null,"source_name":null,"license":"other","status":null,"scm":"git","pull_requests_enabled":true,"icon_url":"https://github.com/grinisrit.png","metadata":{"files":{"readme":"README.md","changelog":null,"contributing":null,"funding":null,"license":"COPYING","code_of_conduct":null,"threat_model":null,"audit":null,"citation":null,"codeowners":null,"security":null,"support":null,"governance":null,"roadmap":null,"authors":null,"dei":null,"publiccode":null,"codemeta":null}},"created_at":"2020-09-16T07:04:30.000Z","updated_at":"2024-10-29T10:18:01.000Z","dependencies_parsed_at":"2024-10-23T01:00:34.528Z","dependency_job_id":"26654d32-dc44-41a6-9d9f-17d5b6212be9","html_url":"https://github.com/grinisrit/noa","commit_stats":null,"previous_names":[],"tags_count":0,"template":false,"template_full_name":null,"repository_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinisrit%2Fnoa","tags_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinisrit%2Fnoa/tags","releases_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinisrit%2Fnoa/releases","manifests_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories/grinisrit%2Fnoa/manifests","owner_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners/grinisrit","download_url":"https://codeload.github.com/grinisrit/noa/tar.gz/refs/heads/master","host":{"name":"GitHub","url":"https://github.com","kind":"github","repositories_count":247234921,"owners_count":20905854,"icon_url":"https://github.com/github.png","version":null,"created_at":"2022-05-30T11:31:42.601Z","updated_at":"2022-07-04T15:15:14.044Z","host_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub","repositories_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repositories","repository_names_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/repository_names","owners_url":"https://repos.ecosyste.ms/api/v1/hosts/GitHub/owners"}},"keywords":["algorithmic-trading","bayesian-methods","cpp17","deep-learning","differentiable-programming","game-development","optimisation-algorithms","optimization","particle-physics","simulation","streaming-analytics"],"created_at":"2024-11-28T15:26:33.433Z","updated_at":"2025-04-04T19:09:22.787Z","avatar_url":"https://github.com/grinisrit.png","language":"C++","readme":"# NOA: Nonlinear Optimisation Algorithms\n\nWe aim to make it easier to integrate optimisation with on-line learning, bayesian computation and \nlarge simulation frameworks through dedicated differentiable algorithms. \nOur solution is suitable for both research \nand applications in performance demanding systems \nsuch as encountered in streaming analytics, game development \nand high frequency trading.\n\n## Installation \n\nCurrently, we support only `GNU`, and `CUDA` for GPU \n(check [WSL](https://docs.nvidia.com/cuda/wsl-user-guide/index.html) for Windows,\nand [LIMA](https://github.com/lima-vm/lima) for macOS).\nA toolchain fully supporting `C++17` is required.\n`NOA` is a header-only library, so you can directly \ndrop the `src/noa` folder into your project.\n\n:warning: However, beyond `C++17` source code, the project contains:\n* `CUDA` sources in `noa/kernels.cuh`\n* `C++` third-party sources in `noa/kernels.hh`\n\nwhich may require separable compilation.\n\n#### Note 1\n`src/noa/kernels.hh` could be compiled separately via `test/kernels.cc`, but it is also possible to include it directly into your program if you want to keep everything inside of the single translation unit.\n#### Note 2: PUMAS\nPUMAS code under `src/noa/3rdparty/_pumas` was syntactically adapted to compile under `g++` with `-fpermissive`.\nTo avoid setting this parameter everywhere, `noa/kernels.hh` doesn't include PUMAS by defaut.\nTo include PUMAS, define `NOA_3RDPARTY_PUMAS` before including `noa/kernels.hh`, and compile the corresponding file with an `-fpermissive` flag.\n\n### CMake project\nThe core of the library depends on \n[LibTorch](https://pytorch.org/get-started/locally) \n(which is also distributed via `pip` and `conda`).\n\nYou can specify whether torch was compiled with C++11 ABI \nsetting `TORCH_USE_CXX11_ABI` to 0 or 1. \nIf we manage to fetch the value of `_GLIBCXX_USE_CXX11_ABI`\nduring configuration, your choice will be overwritten.\nBy default, this variable is 0.\n\n\nFor additional configuration needed by some applications\nplease refer to the documentation [below](#applications).\n\nWe encourage you to work with `conda`. \nIf your system supports `CUDA`, the environment [env.yml](env.yml) \ncontains all the required libraries:\n```\n$ conda env create -f env.yml\n$ conda activate noa\n```\nFor a `CPU` only installation please use [env-cpu.yml](env-cpu.yml) instead.\n\nBuild tests \u0026 install the library \n(to turn testing off add `-DBUILD_NOA_TESTS=OFF`):\n```\n$ mkdir -p build \u0026\u0026 cd build\n$ cmake .. -GNinja -DCMAKE_INSTALL_PREFIX=$CONDA_PREFIX\n$ cmake --build . --target install\n$ ctest -V\n```\nTo build benchmarks specify `-DBUILD_NOA_BENCHMARKS=ON`. \nTo enable parallel execution for some algorithms you should link against `OpenMP`.\nTo build `CUDA` tests add `-DBUILD_NOA_CUDA=ON` \nand the  GPU architecture of your choice,\ne.g. `-DCMAKE_CUDA_ARCHITECTURES=75`.\n\nTo build documentation you need to have [doxygen](https://doxygen.nl/) installed and \nspecify `-DBUILD_DOCS=ON`.\n\nFinally, once `NOA` is installed, \nyou can link against it in your own `CMakeLists.txt` file.\nMake sure to add `LibTorch` as well:\n```cmake\ncmake_minimum_required(VERSION 3.12)\nset(CMAKE_CXX_STANDARD 17)\nfind_package(Torch REQUIRED)\nfind_package(NOA CONFIG REQUIRED)\ntarget_link_libraries(your_target torch NOA::NOA)\ntarget_compile_options(your_target PRIVATE -Wall -Wextra -Wpedantic -O3)\n```\n\n### KMath wrapper\n`NOA` is exposed within the `kotlin` library\n[KMath](https://github.com/mipt-npm/kmath) as a dedicated module\n[kmath-noa](https://github.com/mipt-npm/kmath/tree/feature/noa/kmath-noa).\nTo build the [JNI wrapper](jnoa) you need to add `-DBUILD_JNOA=ON` setting `-DJAVA_HOME=\u003c...\u003e` if necessary. \nThis will produce the shared library `jnoa` to which\nyou should point the `java.library.path` for the `JVM` to load it.\n\n## Applications\n\n`NOA` offers several advanced applications for optimisation. \nPlease refer to the documentation and usage examples \nfor each component to find out more:\n* [GHMC](docs/ghmc) focuses on Bayesian computation \nwith the Geometric HMC algorithms dedicated to sampling \nfrom higher-dimensional probability distributions. \n* [PMS](docs/pms) provides a framework for solving inverse problems\nin the passage of particles through matter simulations. \n* [CFD](docs/cfd) implements adjoint sensitivity models for a variety \nproblems arising in computational fluid dynamics.\n* [QC](docs/qc) is a differentiable quantum chemistry platform for materials design.\n* [QUANT](docs/quant) a differentiable derivative \npricing library.\n\n## Acknowledgments\n\nWhen referring to this library in scientific work please cite\n\n```\n@article{grinis2022diffprog,\n  title={Differentiable programming for particle physics simulations},\n  author={Roland Grinis},\n  journal={JETP Vol. 161 (2)},\n  year={2022}\n}\n```\n\n### Contributors\n\n* [Sabina Abdiganieva](https://github.com/abdiganieva) researched various DFT implementations \nfor QC.\n\n* [Dmitry Bazanov](https://github.com/zugzvangg) developed the Heston volatility surface calibration\nroutines in QUANT and works on its applications to real market data. \n\n* [Gregory Dushkin](https://github.com/GregTheMadMonk) is the main developer for CFD, implementing \ndifferentiable programming algorithms for MHFEM schemes and integrating TNL into the library. \nHe also works on muon simulations in PMS and intergrated pumas.\nHe helped to implement the adjoint sensitivity algorithm for Kohn-Sham equations in QC.\n\n* [Anastasia Golovina](https://github.com/a-tass) wrapped LibTorch's optimizers\ninto KMath.\n\n* [Eugen Kadilenko](https://github.com/ruthenium96) developed the adjoint sensitivity\nmodel for Kohn-Sham equations in QC.\n\n* [Andrey Lipsky](https://github.com/Molozey) works on applications to real\nmarket data for QUANT.\n\n* [Oleg Mosyagin](https://github.com/F5DXWsqPme) implemented the XPU ray-tracing\nalgorithm in PMS.\n\n* [Ivan Novikov](https://github.com/mrFendel) contributes to the documentation\nin QUANT, implemented the PDE methods for the Black-Scholes \nmodel and works on margin models.\n\n* [Danila Ryazanov](https://github.com/DanilaSR) developed the XPU DCS \ncomputations for muons in PMS.\n\n* [Maksim Sosnin](https://github.com/mmssss) implemented the almost exact simulation\nscheme for the Heston Model in QUANT and works on integration with Deep Hedging.\n\n* The JNI wrapper is being developed in collaboration with \n[KMath contributors](https://github.com/mipt-npm/kmath/graphs/contributors).\n\nWe welcome contributions to the project \nand would love to hear about any feature requests\n\n## License\n\nNOA is licensed under the terms and conditions of the GNU General\nPublic License (GPL) version 3 or - at your option - any later\nversion. The GPL can be read [online](https://www.gnu.org/licenses/gpl-3.0.en.html), \nor see the full [LICENSE](LICENSE).\n\nPlease note that NOA license does NOT feature a\ntemplate exception to the GNU General Public License. This means that\nyou must publish any source code which uses any of the NOA header\nfiles if you want to redistribute your program to third parties. If\nthis is unacceptable to you, please [contact us](info@grinisrit.com) \nfor a commercial license.\n\nFor support or consultancy services \ncontact [GrinisRIT](https://www.grinisrit.com).\n\n(c) 2023 GrinisRIT ltd. and contributors\n","funding_links":[],"categories":[],"sub_categories":[],"project_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrinisrit%2Fnoa","html_url":"https://awesome.ecosyste.ms/projects/github.com%2Fgrinisrit%2Fnoa","lists_url":"https://awesome.ecosyste.ms/api/v1/projects/github.com%2Fgrinisrit%2Fnoa/lists"}