kosiokarchev / phytorch

Utilities for physics with PyTorch
GNU General Public License v3.0
6 stars 2 forks source link

φtorch: spark up your physics

utilities for computational physics based on PyTorch


pypi docs license


phytorch (φtorch) is a package for doing physics using PyTorch as the backend for computations, which allows parallelisation on GPUs and automatic differentiation. Check out the docs to see what's on offer!

Installation

φtorch consists of Python modules and a PyTorch extension written in C++/CUDA. Therefore, installation has two steps, but should otherwise be fully automatic.

  1. First, clone (or download) the source code, then cd into the root directory and run

    pip install -e .

    This will automatically install the few dependencies and the pure-Python code (in developer mode, which means that it won't be installed in the site-packages but will run out of the current directory). If you are not interested in special functions and differentiable cosmographic distances, you’re good to go!

    Note In that case, you can also now install the pure-Python components from PyPI using

    pip install phytorch
  2. Then, to compile the extensions,

    cd phytorch-extensions
    python setup.py build_ext -b ../phytorch/extensions

This program is free software and comes with no warranty except that which can be reasonably expected of computer logic. It is, however, licensed under the GNU General Public Licence v3.0, which disallows closed source re-distribution and any such foul nonsense.