Last updated:
0 purchases
phytorch 0.0.42.0
φtorch: spark up your physics
utilities for computational physics based on PyTorch
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.
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
Then, to compile the extensions,
cd phytorch-extensions
python setup.py build_ext
Warning
Building the extensions currently requires you to have a CUDA compiler,
which, I realise, sucks. I’m working on making a cpu-only version possible.
Finally, the extensions, which have now been built in a folder like
phytorch-extensions/build/lib*, need to be linked to phytorch/extensions:
cd ../phytorch/extensions
ln -s ../../phytorch-extensions/build/lib*/* .
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.
For personal and professional use. You cannot resell or redistribute these repositories in their original state.
There are no reviews.