Introduction to pyg-lib
Pyg-lib is a dynamic and robust library designed to provide efficient support for PyTorch and CUDA environments. This project enables users to seamlessly integrate advanced computational performance into their Python applications, harnessing the power of non-CPU acceleration platforms like CUDA. It is particularly useful for developers working on machine learning projects that require high-speed computation.
Installation Compatibility
Pyg-lib aims to serve a wide array of system configurations by offering pre-built Python wheels—these are packages designed for quick installation that eliminate the need to compile the software manually. Here's a comprehensive breakdown of its compatibility:
- Operating Systems: The project provides support for Linux, Windows, and macOS, although the full range of PyTorch and CUDA combinations isn't uniformly available on all OSs. Notably, while Windows users can expect broader support in future updates, currently, only non-Windows distributions have full wheel support.
- Python Versions: It caters to users from Python 3.9 through to the latest release of Python 3.12.
- PyTorch Versions: Users can select from several versions, specifically from PyTorch 1.12 to 2.4.
- CUDA Versions: It aligns with multiple CUDA versions, providing choices such as
cpu
,cu102
,cu113
, up tocu124
depending on the PyTorch version in use.
Installation
To install pyg-lib, users simply execute a pip command in their command-line interface:
pip install pyg-lib -f https://data.pyg.org/whl/torch-${TORCH}+${CUDA}.html
For specific installations, replace ${TORCH}
with the desired PyTorch version and ${CUDA}
with the corresponding CUDA version according to the user's needs and system configuration. A comprehensive table detailing the supported combinations is provided in the project documentation.
Special Installation Options
For developers eager to utilize the most recent updates, pyg-lib also offers options to install nightly versions, which include the latest features and improvements but may be less stable:
pip install pyg-lib -f https://data.pyg.org/whl/nightly/torch-${TORCH}+${CUDA}.html
Additionally, those interested in working directly from the source can install the latest code from the master branch:
pip install ninja wheel
pip install git+https://github.com/pyg-team/pyg-lib.git
Project Status and Support
Users and contributors can easily track the health and status of the project through various badges linked to automated testing and coverage, ensuring transparency regarding its reliability and development progress. This involves both Python-specific and C++-specific testing phases, as well as comprehensive documentation resources. The community is committed to enhancing the library, with significant efforts directed towards expanding Windows compatibility and refining multi-system support.
With a focus on flexibility, performance, and community engagement, pyg-lib offers a significant asset for developers seeking to leverage PyTorch in their computational workloads efficiently across a range of environments.